2011年5月13日
摘要: 经过好长的一段时间,才把union与多个 order by一起联合使用。先看代码:select*from(selecttop1000id,businessNum,rebateNum,specialNumfromcounterwheretype=1orderbybusinessNum,billNum)astunionallselect*from(selecttop1000id,businessNum,rebateNum,specialNumfromcounterwheretype=2orderbybusinessNum,billNum)astg这里需要注意的问题 在内查询中,要用top 进行限定 阅读全文
posted @ 2011-05-13 03:48 wtq 阅读(3771) 评论(0) 推荐(0) 编辑