Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database count using system tables Expand / Collapse
Author
Message
Posted Sunday, September 23, 2007 2:26 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 15, 2013 6:55 PM
Points: 137, Visits: 251
Comments posted to this topic are about the item Database count using system tables
Post #401516
Posted Tuesday, November 10, 2009 7:56 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 22, 2010 8:33 AM
Points: 1, Visits: 3
the query provided by you is not showing database count, it can be used for table count, how we can get the database count in the sql server? is there any way?
Post #816557
Posted Tuesday, November 10, 2009 8:05 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, November 10, 2014 2:21 AM
Points: 2,223, Visits: 3,652
gururajkamath (11/10/2009)
the query provided by you is not showing database count, it can be used for table count, how we can get the database count in the sql server? is there any way?


The query provided by Jorge will give you record count for all tables in a database.
To list out databases, you can query sysdatabases table
select * from sysdatabases

will run for both 2000 and 2005
OR
select * from sys.databases

specific to sql server 2005





Pradeep Singh
Post #816566
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse