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!