sysobjects:
在数据库内创建的每个对象(约束、默认值、日志、规则、存储过程等)在表中占一行。只有在 tempdb 内,每个临时对象才在该表中占一行。
select name from sysobjects where xtype = 'TR' --所有触发器
select name from sysobjects where xtype = 'P' --所有存储过程
select name from sysobjects where xtype = 'V' --所有视图
select name from sysobjects where xtype = 'U' --所有表