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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How many tables in database?

Author  Topic 

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2008-06-17 : 09:29:03
How to code to find out how many tables in database?
I have a db in which may have more than 400 tables. I need find out the exact number.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-17 : 09:29:57
select count(*) From information_schema.tables
where table_type = 'base table'


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 2008-06-17 : 09:35:55
It works great! Thank you!
Go to Top of Page
   

- Advertisement -