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 |
|
csphard
Posting Yak Master
113 Posts |
Posted - 2002-04-30 : 20:27:19
|
| how can i combine the following. I would like to get a total count as well as the actual records.select count(*) from categoriesselect * from categories |
|
|
jbkayne
Posting Yak Master
100 Posts |
Posted - 2002-04-30 : 21:08:12
|
| select *, (select count(*) from categories) as TotalCountfrom categories |
 |
|
|
Paulo
Starting Member
3 Posts |
Posted - 2002-05-03 : 18:15:14
|
| If you want to avoid using a subquery, you can do this:select *, @@rowcount as MyRows from categories.This will be a little more efficient. |
 |
|
|
Paulo
Starting Member
3 Posts |
Posted - 2002-05-03 : 18:29:09
|
| DOH! My bad - ignore my previous post. |
 |
|
|
|
|
|