all groups > sql server programming > september 2003 >
You're in the

sql server programming

group:

TOP



Re: TOP Aaron Bertrand [MVP]
9/20/2003 2:08:44 PM
sql server programming: SELECT * FROM table WHERE primary_key_column NOT IN (
SELECT TOP 5 primary_key_column FROM table ORDER BY ???)





[quoted text, click to view]

TOP Luís Serpa
9/20/2003 6:02:01 PM
Hi

i whant to select all my record's from a table but not included the frist 5

i whant to do the oposite of the TOP 5

thank's

Luis Serpa

Re: TOP John Bell
9/20/2003 7:50:07 PM
Hi

You could use a not in clause

SELECT * FROM MyTable
WHERE Id NOT IN ( SELECT TOP 5 Id FROM MyTable ORDER BY Id DESC )

John

[quoted text, click to view]

AddThis Social Bookmark Button