How to check if a stored procedure exist?

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

    The only way to see if a procedure exists in the database is though querying DBA_OBJECTS. The disadvantage here is that only a dba has access to this view. Second best is using all_objects. ALL_OBJECTS shows you the objects for which you have somehow a privilege. USER_OBJECTS only shows you your own objects.

提交回复
热议问题