Tuesday, 29 May 2012

Important quries in Sql Server


Get Detail of Trigger in DataBase :

SELECT * FROM SYS.OBJECTS WHERE TYPE_DESC = 'SQL_TRIGGER'

Get Detail of TABLES in DataBase :

SELECT * FROM SYS.OBJECTS WHERE TYPE_DESC = 'USER_TABLE'

Get Detail of SPs in DataBase :

SELECT * FROM SYS.OBJECTS WHERE TYPE_DESC = 'SQL_STORED_PROCEDURE'

Get Detail of View in DataBase :

SELECT * FROM SYS.OBJECTS WHERE TYPE_DESC = 'VIEW'

Get Detail of Scalar function in DataBase :

SELECT * FROM SYS.OBJECTS WHERE TYPE_DESC = 'SQL_SCALAR_FUNCTION'

Get Detail of table valued function in DataBase :

SELECT * FROM SYS.OBJECTS WHERE TYPE_DESC = 'SQL_TABLE_VALUED_FUNCTION'

No comments:

Post a Comment