public knowledge blog_load(sender Virendra)

                                                                                                                          Nothing shocks me, I am a Software Engineer.

Count number of tables in a SQL Server database

Posted by Virendra Dugar on January 6, 2009

A simple query to find out number of tables in database is


USE YOURDBNAME

SELECT COUNT(*) from information_schema.tables 
WHERE table_type = ‘base table’ 

 

Enjoy…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: