Answers for "Object Information"

SQL
0

Object Information

--list all the tables         
SELECT name AS [Tables] FROM sys.objects WHERE OBJECTPROPERTY(object_id, 'isUserTable')<>0
--list all the Scalar functions
SELECT name AS [Scalar functions] FROM sys.objects WHERE OBJECTPROPERTY(object_id, 'IsScalarFunction')<>0
--list all the Table Functions
SELECT name AS [Table Functions] FROM sys.objects WHERE OBJECTPROPERTY(object_id, 'IsTableFunction')<>0
--list all the Procedures
SELECT name AS [Procedures] FROM sys.objects WHERE OBJECTPROPERTY(object_id, 'IsProcedure')<>0
--list all the Triggers
SELECT name AS [Triggers] FROM sys.objects WHERE OBJECTPROPERTY(object_id, 'IsTrigger')<>0
Posted by: Guest on October-11-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language