Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi frndz
i want to show data with serial no in sql server 2000..is there are any query in which records are show with serial no meanse 1 2 3 4 5 6...


for eg

ADM-1177 1
ADM-1178 2
ADM-1179 3
ADM-1180 4
ADM-1181 5
ADM-1182 6
ADM-1183 7
ADM-1184 8
ADM-1185 9

i need this serial no 1 2 3 4 5...
Posted

you can use ORDER BY clause
<pre lang="SQL">
SELECT * FROM tablename ORDER BY serialno</pre>
 
Share this answer
 
 
Share this answer
 
Hi friend,

add one more column named serial No. and make it identity column.
 
Share this answer
 
both r not working in sql 2000
 
Share this answer
 
yeah, bt i already take identity column bt if i want the records with 'WHERE' clause then it dnt show sequence
 
Share this answer
 

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