select name from sysobjects where xtype='P' --所有存储过程
select name from sysobjects where xtype='V' --所有视图
select name from sysobjects where xtype='U' --所有表
以上为SqlServer用法
Select object_name From user_objects Where object_type='TRIGGER' --所有触发器
Select object_name From user_objects Where object_type='PROCEDURE' --所有存储过程
Select object_name From user_objects Where object_type='VIEW' --所有视图
Select object_name From user_objects Where object_type='TABLE'--所有表
以上为Oracle用法
以上,希望对你有所帮助!
select name from sysobjects where xtype='P' --所有存储过程select name from sysobjects where xtype='V' --所有视图select name from sysobjects where xtype='U' --所有表全部禁用:Alter table t1 disable trigger all全部生效:Alter table t1 enable trigger all单个禁用:Alter table t1 disable trigger 触发器名查出指定TR的内容:sp_helptext 't_test'查出所有名称与内容:select b.name as 名称,a.text as 内容,case xtype when 'p ' then '存储过程 ' else '触发器 ' end as 类型 from syscomments a,sysobjects b where object_id(b.name)=a.id and b.xtype in( 'P ', 'TR ') and b.status =0order by 类型查出所有非系统数据库并列出:select * fromsysdatabaseswhere dbid4查出某表中所有字段名与字段类型:select a.name as [column],b.name as typefrom syscolumns a,systypes bwhere a.id=object_id('employee') and a.xtype=b.xtype--------------------查出触发器是启用还是禁用。select a.name as 触发器名,b.name as 表名,欢迎分享,转载请注明来源:内存溢出
评论列表(0条)