求sql语句,

liujian098 2004-12-17 02:25:45
table1
a b c

table2
b d


我知道table1中的a的一个值,我想查询出 在表table2中存在的b的值而不在table1中
怎么写sql语句?
...全文
44 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lvenx 2004-12-17
  • 打赏
  • 举报
回复
select * from table2 where b not in(select b from table1 where a='')
long0104 2004-12-17
  • 打赏
  • 举报
回复
select * from table2 where b not in(select b from table1 where a='')
ljial 2004-12-17
  • 打赏
  • 举报
回复
select * from table2 where b not in(select b from table1 where a='')

34,870

社区成员

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

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