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 2000 Forums
 SQL Server Development (2000)
 table name and owner

Author  Topic 

sachingovekar
Posting Yak Master

101 Posts

Posted - 2009-02-03 : 10:55:05
Hi,

I have many tables in my sql server 2000 database.
Also different owners have created different tables.

I want to know all tables having owners?

data should look like:

Name Owner
Table1 Rick
Table2 John
Table3 Austin

Regards,
Sachin

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2009-02-03 : 11:14:13
have a look at information_schema.tables

Em
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-03 : 11:31:02
[code]SELECT TABLE_NAME AS NAME,TABLE_SCHEMA AS OWNER
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME NOT IN('dtproperties')[/code]
Go to Top of Page

sachingovekar
Posting Yak Master

101 Posts

Posted - 2009-02-03 : 11:40:44
Thanks sodeep

that helped a lot
Go to Top of Page
   

- Advertisement -