How to check if a stored procedure exist?

后端 未结 6 1418
情书的邮戳
情书的邮戳 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:27

    Something that worked for me!

    SELECT text
    FROM all_source
    WHERE name = 'MY_SP_NAME'
    ORDER BY line;
    

    Alternatively you can try calling SP like this:

    CALL MY_SP_NAME();
    

    You might end up error like this, but that confirms you have SP defined there:

    OCI Statement Execution failure.ORA-06553: PLS-306: wrong number or types of arguments in call to 'MY_SP_NAME'
    

提交回复
热议问题