|
-- to Display Table info(Columns, DataTypes etc...)
EXEC sp_columns 'EMP'
-- or --
EXEC sp_help 'EMP'
-- to Display a list of objects that can be queried in the current environment
EXEC sp_tables
-- to Display the Content of Stored Procedure
EXEC sp_helptext 'mySP'
-- to execute/built SQL statements/batch dynamically
EXEC sp_executesql
N'SELECT * FROM EMP WHERE ID = @var',
N'@var tinyint',
@var = 2
-- to Provides information about current users and processes
EXEC sp_who
EXEC sp_who2
-- to display types of DML triggers defined on the specified table
EXEC sp_helptrigger 'EMP'
|