i would like to write
insert into tbl1(a,b)
select 123, (select id from tbl2 where status=987)
the problem is, only one row is inserted instead of many rows. How do i fix this? using Sqlite.
i would like to write
insert into tbl1(a,b)
select 123, (select id from tbl2 where status=987)
the problem is, only one row is inserted instead of many rows. How do i fix this? using Sqlite.
did u try tis?
insert into tbl1(a,b)
select 123, x.*
from (select id from tbl2 where status=987) x
Why not :
insert into tbl1(a,b)
select 123, id
from tbl2
where status = 987;
?