Larry Brister
asked on
SQL Select with total count rows outter apply?
Weird request
I need a select * from myTable and I need a column appended that shows the total count of rows...
NOT running row number.
So if I have a select with 3 rows it would return this
ID cnt
1 3
2 3
3 3
I need a select * from myTable and I need a column appended that shows the total count of rows...
NOT running row number.
So if I have a select with 3 rows it would return this
ID cnt
1 3
2 3
3 3
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect. Thanks
t.*
,(
Select COUNT(*) FROM myTable
) cnt
from
myTable t