Count total number of tables
Suppose you want to count the number of tables in a database. It's quiet simple. Just use the information_schema.tables
The below query will return you the count of the tables in the database .
USE YOURDBNAME
select count(*) as TablesCount from sys.tables
Count total number of stored procedure
USE YOURDBNAME
select count(*) as ProceduresCount from sys.procedures
Count total number of triggers
USE YOURDBNAME
SELECT count(*) AS MyTriggers FROM sys.triggers
Count total number of tables views
USE YOURDBNAME
SELECT count(*) AS MyViews FROM sys.views

Hong TrieuPosted May 5, 2014, 4:33 AM
Cool.
Ravi PatelPosted Apr 24, 2014, 2:33 PM
very nice