Hi,
I'd like to list all objects of a particular database in SQL Server 2005. I created a query as shown below:
select name, type_desc from sys.objects
WHERE type in ( 'C', 'D', 'F', 'L', 'P', 'PK', 'RF', 'TR', 'UQ', 'V', 'X' )
union
select name, type_desc from sys.indexes
order by name
However, this query list all objects of ALL databases rather than a particular database.
My question is: Is there a way to query all objects of just a particular database? If yes, could you please show me how to do it?