?????????????SQL???????
???????????? ???????[ 2013/4/8 10:53:24 ] ????????
???????????????SQL????????????????????????????????????
?????????????90W??????????3KB???????MSSQL2005
????????????????
????DBCC FREEPROCCACHE
????DBCC DROPCLEANBUFFERS
?????????????????
????1??Top
????select top 10 * from message where id not in (select top 20 id frommessage where classid=77 order by id desc ) and classid=77 order by id desc
????2??Max/Top
????select top 10 * from message where id <(select min(id) from messagewhere id in(select top 20 id from message where classid=77 order by iddesc) ) and classid=77 order by id desc
????3??row_number
????select top 10 * from (select row_number()over(order by id desc) rownumber??*from message where classid=77)a where classid=77 and rownumber>20
?????????
????1)?????????????????????????????????????Σ?????????????????row_number?????????????????Max/Top??????????????????
????2)????÷?????????????£?????????κ?????????????????????????????????????SQL?????????????????????????????????????????????????????????
????3)???????????????ò??????????е??????!
???????????row_number> max/top > top
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11