views:

20

answers:

2

I need to view the number of tables existing under one particular Owner/Creator.

How would I do this?


Note:

I am using SQL Server 2008.

A: 

use yourdb;

SELECT count(*)
FROM INFORMATION_SCHEMA.Tables
where table_type like '%base table%'
Eric
A: 
select   table_schema, 
         COUNT(*)
from     information_schema.Tables
where    table_type = 'BASE TABLE'
         AND table_schema = 'myschema' -- replace this with the schema/owner you are looking for
group by table_schema
Scott Ivey

related questions