Retrieve User Defined Object Details

 We can use below code snippets to retrieve the information related to the user defined object.
 
Code Snippets: 

  1. SELECT name AS ObjectName,  
  2.   
  3. type,  
  4.   
  5. OBJECT_NAME(schema_id) SchemaName,  
  6.   
  7. OBJECT_NAME(parent_object_id) ParentObjectName, *  
  8.   
  9. FROM sys.objects  
  10.   
  11. WHERE type = 'U'  

Output:
 
 
In the above query we defined the "U" for user defined table type in where clause. You can use the following annotations to retrieve the information related to other user defined objects.
   
 Symbol    User Defined Object
 C   Check Constraint
 D  Default
 P  SQL Stored Stored Procedure
 AF  Aggregate Function
 F  Foreign Key
 FN  SQL Scalar Function
 S  System Table
 SN  Synonym
 V  View
 IT  Internal Table
 U  User Table
 TR  Trigger
 UQ  Unique Constraint 
 X  Extended Stored Procedure
 IF  Inline Tabled valued Function
 PK  Primary Key