Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to retreive the first 10 records from the sql server.
how to retreive the first 10 records
please specify
Posted

Use the following type of query :

SQL
select top 10 * from tablename
 
Share this answer
 
Comments
fjdiewornncalwe 19-Oct-11 13:38pm    
It looks like you know the answer to this exam question. +5.
Mehdi Gholam 19-Oct-11 13:40pm    
If only I had studied this hard for my degree... :)
use it.
SQL
select top(10) t.*  from tablename t
 
Share this answer
 
v2
Comments
fjdiewornncalwe 20-Oct-11 13:16pm    
Please read existing answers before adding duplicates.

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



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