title: How to list all objects of a particular database in SQL Server
body: <p>I would like to list all objects of a particular database in SQL Server. I created a query as shown below:</p>
  <pre><code>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
  </code></pre>
  <p>However, this query list all objects of ALL databases rather than a particular database.</p>
  <p>My question is: Is there a way to query all objects of just a particular database?</p>