insert into A(no,name,status)values
(
select no,name,'Add' from B where B.no not in
(select no from A)
)
A(no,name,status)
B(no,name)
no是主键,上面这么写报错,请问要怎么改 ?
insert into A(no,name,status)
select no,name,'Add' from B where B.no not in
(select no from A)
括号是把单个的数值变成表。你的Select出来已经是表了,就不用括号了
一楼的是正解,不要用括号和values了。