根據內容查儲存過程

2021-08-11 22:33:17 字數 673 閱讀 5176

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%';

oracle根據儲存過程中內容查詢儲存過程名

在oracle中,物件的源 是可以從user source資料字典中 1.有時候知道物件的某一部分內容,但不知道物件名是什麼,可以通過 select from user source s where s.text like 退出 來查詢。2.自己寫完了儲存過程忘了這個過程的內容是什麼了,就可以使用o...

linux根據條件查詢檔案 根據檔案內容查詢檔案

find 命令選項 路徑 表示式選項 選項 empty 查詢空白檔案或目錄。group 按組查詢。name 按文件名稱查詢。iname 按文件名稱查詢,且不區分大小寫。mtime 按修改時間查詢。size 按容量大小查詢。user 按使用者查詢。exec 對找到的檔案執行特定的命令。a 並且。o 或...

修改內容的儲存過程

set ansi nulls on set quoted identifier on goalter procedure dbo updatenews newsid int,title nvarchar 100 content text,catids varchar 200 error nvarch...