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.
I need to view the number of tables existing under one particular Owner/Creator.
How would I do this?
I am using SQL Server 2008.
use yourdb;
SELECT count(*)
FROM INFORMATION_SCHEMA.Tables
where table_type like '%base table%'
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