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 |
|
spowell
Starting Member
23 Posts |
Posted - 2010-07-20 : 08:48:20
|
| HiI have a table that has 2000 rows of information. I need to allocate a unique number to each row. Can anyone help me do this?Thanks for reading |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-20 : 08:52:25
|
selectrow_number() over (order by (select 1)) as unique_number,*from your_tableIf that isn't what you want then be more specific please. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-20 : 08:53:52
|
| select ROW_NUMBER()over(order by (select 1))as uniqueid,* from yourtableLimitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
spowell
Starting Member
23 Posts |
Posted - 2010-07-20 : 10:21:25
|
| Thank you both for your help |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-07-20 : 10:25:35
|
welcome No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|