Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I am using sqlserver 2005.

How to use sql query that not display top(10) record in table.

any suggestion or idea, help will be appreciated........

mukesh
Posted
Comments
Mas11 24-Mar-12 3:08am    
Your question is not clear.. plz write in brief.

1 solution

once i solved such query as:
SQL
with cte as (
 SELECT * ,
  ROW_NUMBER () over (order by CountryId ) as rn
 FROM Country )
SELECT * FROM cte
WHERE rn>10 ;

here CountryId is just the primary key of the table
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900