How to check if a stored procedure exist?

后端 未结 6 1416
情书的邮戳
情书的邮戳 2020-12-30 09:58

I have searched the net and I\'ve found a post that uses the following snippet to check if a stored procedure exists:

select * 
  from USER_SOURCE 
 where ty         


        
6条回答
  •  臣服心动
    2020-12-30 10:21

    Execute the query below in SQL*PLUS, ODBC Test,...

    SELECT text FROM all_source WHERE name='MY_PROCEDURE' ORDER BY line

    where MY_PROCEDURE is the stored procedure name.

    Below is sample output:

    Get Data All: "TEXT" "PROCEDURE Usp_Get_Blob
    "(
    "P_DOC_ID INT,
    "P_DOC_TEXT OUT BLOB)
    "as
    "begin
    " select B1 into p_doc_text
    " from blobtest
    " where ID = p_doc_id;
    "end; "

提交回复
热议问题