怎么在易语言里用SQL查询语句 取得一access数据库中两个表同文本一字段的差集?

用“select 号码 from 表1 except select 号码 from 表2” 这样的语句为什么没结果?

试试这个:
select * from 表1 where 表1.号码 not in(select 号码 from 表2)追问

不行的

追答

如果你是想要表1中有但是表2没有,以及表2中有但是表1没有的集合,可以这样:
select * from 表1 where 表1.号码 not in(select 号码 from 表2) union select * from 表2 where 表2.号码 not in(select 号码 from 表1)
经测试是可以。

温馨提示:答案为网友推荐,仅供参考
相似回答