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 |
|
ajay
Starting Member
34 Posts |
Posted - 2003-05-09 : 15:13:18
|
| Using Query Analyzer, Please tell me 3 ways to get an accurate count of the number of records in a table..One offcourse select count(*)...Other two..?Thanksajay |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-05-09 : 15:27:59
|
| Is your examine today?Brett8-) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-05-09 : 15:37:48
|
| I was wondering the same thing.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-05-09 : 16:25:23
|
| Maybe you can count them by hand?Brett8-) |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2003-05-09 : 17:26:06
|
| SELECT SUM(1) ...(It's two characters shorter, too)Edited by - Arnold Fribble on 05/09/2003 17:26:42 |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-05-09 : 17:36:00
|
| In query analyzer?OK ... how about SELECT 1 from ...then just look at the row count returned at the end of the results.(That's even shorter to type ! not very efficent I'm afraid ...)but i fear we are definitely just answering a homework question here ....good luck in your class.- Jeff |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2003-05-09 : 18:11:55
|
| and for the thirdSELECT SUM(2-1) ... ==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-05-09 : 23:36:27
|
| We're not trying to be mean ( are we?)But do some leg worksp_spaceused??HELLOBrett8-) |
 |
|
|
|
|
|