|
-
Jan 14th, 2006, 01:03 PM
#1
Thread Starter
Fanatic Member
Query to get Table Names by specifying database
Hi all,
I am trying to write a query for a stored procedure that will allow me to pass in the database name and it will return a list of tables in that database. I know I can do a exec sp_tables but I will not know which database I need to execute this on. Essentially I want something like this: select * from [specifryDBhere].sysobjects where xtype IN ('U', 'S', 'V') order by name asc
Is there a table in master that lists all tables in all databases? How else can I do this in the stored procedure?
Thanks for any assistance!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|