Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many rows in all tables in a DB?

Status
Not open for further replies.

TheJFM

Programmer
Jun 13, 2002
65
GB
Hi

I know I should know this but ... how do I get the number of rows per table back quickly from a database?

Ta

** Don't reach for the moon when you have the stars. ;-) TheJFM **
 
select o.name, rows from sysindexes i, sysobjects o where i.indid in (0,1) and o.id = i.id and o.xtype = 'U'

======================================
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.
 
Thanks!!

** Don't reach for the moon when you have the stars. ;-) TheJFM **
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top