日期:2014-05-18 浏览次数:20564 次
insert into c select * from a where 工资>5000 and 年龄<25 and exists(select 1 from b where 证件号码=a.证件号码)
------解决方案--------------------
insert c select * from a join b on a.证件号码=b.证件号码 where a.工资>5000 and a.年龄<25
------解决方案--------------------
insert into C select * from A a where [工资]>5000 and [年龄] <25 and exists (select 1 from B b where a.[证件号码] = b.[证件号码])
------解决方案--------------------
INSERT INTO C(工号,姓名,证件号码,性别,年龄,工资) SELECT * FROM A WHERE 工资 > 5000 AND 年龄 < 25 AND EXISTS(SELECT 1 FROM B WHERE A.证件号码 = B.证件号码)
------解决方案--------------------
如果C表不存在的,使用以下语句
select * into C from a join b on a.证件号码=b.证件号码 where a.工资>5000 and a.年龄<25
我的异常网推荐解决方案:软件开发者薪资,http://www.aiyiweb.com/other/1391128.html