Posted by Greg D. Moore \(Strider\) on 02/25/07 16:46
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns98E272B8618B9Yazorman@127.0.0.1...
> Ed Murphy (emurphy42@socal.rr.com) writes:
>> (I forget, how does/doesn't SELECT TOP 15 work in SQL 2K vs 2K5? I
>> haven't had occasion to need to remember.)
>
> They work the same. But SQL 2005 also has SELECT TOP(<expr)), so that
> you can have a variable - or something even more complex.
>
With the caveat of course (since it'll come up I'm sure) that SELECT TOP x
with ORDER BY in a view does NOT work in 2005 (doesn't really work in 2000
except when it does. ;-)
--
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com
[Back to original message]
|