多个字段用in子查询应该怎么写?

luxuinstan 2004-03-11 11:11:45
select * from a where ( (x,y) in (select (x,y) from b where z='010') )好象不行,应该怎么写???
...全文
299 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
sqtwyj 2004-04-11
  • 打赏
  • 举报
回复
select * from a where exists(select x,y from b where a.x=b.x and a.y=b.y)
yang771 2004-04-09
  • 打赏
  • 举报
回复
同意樓上的...頂..
anddytang 2004-04-08
  • 打赏
  • 举报
回复
select * from a where x in (select x from b where z='010')
and y in (select y from b where z='010')
happyfish21cn 2004-04-08
  • 打赏
  • 举报
回复
select * from a where ( (x+y) in (select (x+y) from b where z='010') )

如果X,Y不算字符就加convert

22,210

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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