查詢儲存過程

2021-07-28 18:02:14 字數 707 閱讀 8099

1.oracle中下面這麼寫

按名查詢儲存過程: 

select   *   from   user_objects  

where   object_type='procedure' and object_name like '%'||upper('p')||'%' 

按內容查詢儲存過程: 

select * from all_source  where type='procedure'  and text like '%'||upper('clean_')||'%' 

select * from all_source  where type='package body' and text like '%function%'and owner='system' and name='tablename';

有點慢,ms沒什麼好方法 

2.ms server中下面這麼寫

按名查詢儲存過程: 

exec sp_helptext '儲存過程名'; 

按內容查詢儲存過程: 

select b.name 

from kbmp.dbo.syscomments a,kbmp.dbo.sysobjects b 

where a.id=b.id  and b.xtype='p' and a.text like '%if_check%';

儲存過程系列之儲存過程sql查詢儲存過程的使用

1.查詢某個表被哪些儲存過程 以下簡稱 sp 使用到 select distinct object name id from syscomments where id in select object id from sys.objects where type p and text like ta...

儲存過程系列之儲存過程sql查詢儲存過程的使用

1.查詢某個表被哪些儲存過程 以下簡稱 sp 使用到 select distinct object name id from syscomments where id in select object id from sys.objects where type p and text like ta...

模糊查詢(儲存過程)

set ansi nulls on set quoted identifier on goalter procedure dbo searchvague description varchar 1000 descriptionlength int,pagenumber tinyint,product...