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 |
|
safderalimd
Starting Member
32 Posts |
Posted - 2010-07-07 : 13:53:53
|
| How can I get row_count as column along with other columns in result setFor example.Select col1, col2 from tableI need to add third column to this result set to give number of rows in the same result set. Any easy way to get this with out using group by? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
safderalimd
Starting Member
32 Posts |
Posted - 2010-07-07 : 14:46:16
|
| For example if we have 5 rows, row_number will give 1,2,3,4 and 5.I want value of 5 in each row, which is I want row count value in a seperate column for each row. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|