Posted By

pauliehaha on 02/09/09


Tagged


Versions (?)

object list


 / Published in: SQL
 

  1. -- Tables
  2. SELECT [name] AS 'Object Name','Table' AS 'Obj Attr' FROM sys.objects WHERE type IN (N'U')
  3. -- SP's
  4. UNION
  5. SELECT [name] AS 'Object Name','Stored Procedure' AS 'Obj Attr' FROM sys.objects WHERE type IN (N'P', N'PC')
  6. -- Functions
  7. UNION
  8. SELECT [name] AS 'Object Name','Function' AS 'Obj Attr' FROM sys.objects WHERE type IN (N'FN', N'IF', N'TF', N'FS', N'FT')
  9. -- Views
  10. UNION
  11. SELECT [name] AS 'Object Name', [type_desc] AS 'Obj Attr' FROM sys.views
  12. -- Triggers
  13. UNION
  14. SELECT [name] AS 'Object Name', [type_desc] AS 'Obj Attr' FROM sys.triggers

Report this snippet  

You need to login to post a comment.