Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
gfaryd
Starting Member
27 Posts |
Posted - 2010-09-30 : 09:21:30
|
| sql 2000 questioni have following table structurecreate table my_tab(pname varchar(35), fname varchar(35), age varchar(10))table contains more than 20000 rowsi have added a column serial_no. i want to assign serial numbers (starting from 1) in table how to do that. i dont want an identity column. regards, |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-09-30 : 09:31:46
|
| why not? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-09-30 : 11:54:11
|
| best way is to make it identity column. If not, you need to use ROW_NUMBER() function. But for that you should be using SQL 2005 or later------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-10-01 : 06:09:32
|
| If you dont want to use an identity column, do numbering in the front end applicationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|