Click here to Skip to main content
14,665,327 members
Rate this:
Please Sign up or sign in to 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

Rate this:
Please Sign up or sign in to vote.

Solution 1

you can use ORDER BY clause
<pre lang="SQL">
SELECT * FROM tablename ORDER BY serialno</pre>
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

   
Rate this:
Please Sign up or sign in to vote.

Solution 4

Hi friend,

add one more column named serial No. and make it identity column.
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

both r not working in sql 2000
   
Rate this:
Please Sign up or sign in to vote.

Solution 5

yeah, bt i already take identity column bt if i want the records with 'WHERE' clause then it dnt show sequence
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100