如何实现两个表之间相减的操作? select * from table1 where name not in (select name from table2) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select A.name,A.age - B.agefrom table1 A,table2 Bwhere A.name := B.name没试过,不知道行不行 to xuam() :不是匹配一个字段,是匹配两个表内的所有字段(两个表结构一样) 不是匹配的问题,只要排除两个表name一样的记录就可以了吧 select * from table1 a where not exists (select * from table2 b where a.name=b.nameand a.age=b.age) 赞同lh1979()select * from table1 a where not exists (select * from table2 b where a.name=b.nameand a.age=b.age) select * from table1 where not exists (select * from table2); 高手请进! sql客户端一部分用不了,我应该从哪里入手? 如何才能不插入null呢? 如何存 长度几千的字符串阿 怎么将两个日期之间的记录找出来?? 数据库连接问题 SQL 2005下中文成了问号 ?????????????难题来啦????????????? 请问各路高手,在同一台机子上可不可以同时安装sqlserver7.0和sql server2000,如果可以的话又如何配置呢 请帮忙看一下这个由ACCESS 语句转SQL SERVER的语句为什么提示错误 按装问题 求SQL语句,如何根据条件分组汇总
from table1 A,table2 B
where A.name := B.name没试过,不知道行不行
不是匹配一个字段,是匹配两个表内的所有字段(两个表结构一样)
and a.age=b.age)
select * from table1 a where not exists (select * from table2 b where a.name=b.name
and a.age=b.age)