而在sql server2005中,对top语句进行了增强我们可以这样写:
SELECT TOP @cn * FROM tableName cols where 0 = 0
甚至使用子查询确定要去的条数:
SELECT TOP (select count(*) cn from anotherTable where 0 = 0) cols FROM tableName where 0 = 0 ORDER BY col。
还有一点就是在sql server2005中可以在delete或者update中使用top了,不过感觉这个功能不会很常用。