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 |
|
k_cire0426
Yak Posting Veteran
63 Posts |
Posted - 2009-02-12 : 17:55:47
|
| How to add auto increment number other than IDENTITY? Because IDENTITY is using INTO, i don't want to use that.Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
k_cire0426
Yak Posting Veteran
63 Posts |
Posted - 2009-02-12 : 18:24:14
|
| Hi,I am using Select statement to select data from existing tables and I want the output of the select statement to have an identity or added rows which determined how many rows are there. Hope this makes clear..:)Thanks |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-12 : 18:25:32
|
| Use ROW_NUMBER() Function available in SQL 2005 onwards. |
 |
|
|
k_cire0426
Yak Posting Veteran
63 Posts |
Posted - 2009-02-12 : 18:25:50
|
| I got it now..ROW_NUMBER is the solution..:) |
 |
|
|
|
|
|