SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table t1 (id_1 int, c1 text); create table t2 (c2 text, age int); insert into t1 values (1, '326789'), (2, 'sql'), (3, '31007'), (4, '732156'), (5, '10097'); insert into t2 values ('326789', 12), ('sql', 23), ('031007', 34), ('732156',45 ), ('010097', 46); select * from t1 join t2 on t1.c1 = ltrim(t2.c2, '0')

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear