34,594
社区成员
发帖
与我相关
我的任务
分享
insert into TB1(name,age,add,city,state)
select m.name,m.age,n.add,n.city,State=0 from tb2 m , tb3 n where m.c_id = n.c_id and m.c_id = 20
insert into TB1
select 某固定值,m.name,m.age,n.add,n.city,State=0 from tb2 m , tb3 n where m.c_id = n.c_id and m.c_id = 20
insert TB1(name,age,add,city,state)
select a.name,a.age,b.add,b.city,0
from tb2 a
join tb3 b on a.c_id=b.c_id
where a.c_id=20
insert TB1(Id,name,age,[add],city,[state])
select name ,age,[add],city,[state]=0
from TB2 JOIN TB3 ON TB2.c_id=TB3.C_ID
WHERE TB2.C_ID=20