select where in排序问题

wrain001 2013-08-08 03:05:15
例如:select * from tableA where id in (select cid from tableB order by cid)

如何按子句顺序排列,高手帮忙
...全文
105 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
rubynle 2013-08-08
  • 打赏
  • 举报
回复
1楼正解~~~~
Shawn 2013-08-08
  • 打赏
  • 举报
回复

SELECT a.*
FROM tableA a
	INNER JOIN tableB b
		ON a.id = b.cid
ORDER BY b.cid
  • 打赏
  • 举报
回复

select * from tableA where id in (select cid from tableB order by cid) order by id

22,209

社区成员

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

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