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 |
|
imtu_174
Starting Member
9 Posts |
Posted - 2005-09-08 : 17:47:55
|
| Is there any sys object in SQL Server which stores information such as number of records in the user tables. I know this can be known by writing a procedure , I just want to know if this is possible.In oracle we have num_rows column in dba_tables. |
|
|
ryanston
Microsoft SQL Server Product Team
89 Posts |
Posted - 2005-09-08 : 18:27:09
|
| The [rowcnt] table in sysindexes contains the number of data rows in the index. It's not guaranteed to be 100% accurate until/unless you run DBCC UPDATEUSAGE.Thanks,----------------------Ryan StonecipherDeveloper, Microsoft SQL Server Storage Engine, DBCC(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.) |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2005-09-08 : 20:47:00
|
| that'sselect object_name(id), rows from syindexes where indid in (0,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. |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-09-08 : 20:51:55
|
quote: The [rowcnt] table in sysindexes
Wow, all this time I thought it was just a column... So MS finally decided to add THAT particular Oracle feature, hmmm? |
 |
|
|
ryanston
Microsoft SQL Server Product Team
89 Posts |
Posted - 2005-09-08 : 22:40:11
|
Oh sure, pick on the Microsoft guy. I'm a programmer, not a doc writer! Actually, I have an English major so I don't really have much of an excuse.----------------------Ryan StonecipherDeveloper, Microsoft SQL Server Storage Engine, DBCC(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.) |
 |
|
|
|
|
|
|
|