SQLSERVER查看存储过程,触发器语句
1、查询所有存储过程的名称以及定义
SELECT name, definition
FROM sys.sql_modules AS m
INNER JOIN sys.all_objects AS o ON m.object_id = o.object_id
WHERE o.[type] = 'P'
2、查看某一个存储过程
EXEC sp_helptext 'sp_MSrepl_startup'
3、查看某个库当前的触发器
USE [pratice]
GO
Select * FROM sys.objects WHERE [type] = 'tr'
Select * FROM sys.[sysobjects] WHERE [xtype] = 'tr'