怎么样选择表A中字段YpID与表B中字段YpID内容不相同的所有记录的所有字段?

tzsimple 2003-09-11 12:14:15
怎么样选择表A中字段YpID与表B中字段YpID内容不相同的所有记录的所有字段?
...全文
51 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
happydreamer 2003-09-11
  • 打赏
  • 举报
回复



select * from A where not exists(select 1 from B where A.YpID=B.YpID)
sdhdy 2003-09-11
  • 打赏
  • 举报
回复
select * from 表A where YpID not in(select distinct YpID from 表B)
Myyokel 2003-09-11
  • 打赏
  • 举报
回复
select * from a where YpID not in(select YpID from b)
lxf31 2003-09-11
  • 打赏
  • 举报
回复
Select * From 表A Where YpID Not In(Select YpID From 表B)
ysycrazy 2003-09-11
  • 打赏
  • 举报
回复
select * from 表A where YpID not in(select distinct YpID from 表B)

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧