在 SQL developer 中查看过程中的代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32221627/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
View code inside procedure in SQL developer
提问by Manoj Thambe
I have a procedure in SQL developer and I want to view what is written inside that procedure..how should I do it?
我在 SQL 开发人员中有一个过程,我想查看该过程中写入的内容..我应该怎么做?
I am unable to see the code written inside the procedure but I am able to see the procedure structure when I run the query desc schema name.procedure name
我看不到过程中编写的代码,但是当我运行查询 desc schema name.procedure name 时,我能够看到过程结构
Any help is appreciated..
任何帮助表示赞赏..
回答by Arun Palanisamy
You can use the connections
tab which is in the left side of sql developer.
您可以使用位于connections
sql developer 左侧的选项卡。
Click the +
icon near schema name then +
near procedure as shown in the pic.Under that you will have all the existing procedure. You can click any of it to view
单击+
模式名称+
附近的图标,然后单击程序附近,如图所示。在那里您将拥有所有现有程序。您可以单击其中任何一个进行查看
回答by Lalit Kumar B
SQL Developer
SQL 开发人员
Browse to the connection name in the connections tab, expand the required object and just click, it will open the code in new tab.
在连接选项卡中浏览到连接名称,展开所需的对象并单击,它将在新选项卡中打开代码。
ALL|USER|DBA_SOURCE view
ALL|USER|DBA_SOURCE 视图
Alternatively, you could query the DBA_SOURCE
view:
或者,您可以查询DBA_SOURCE
视图:
SELECT text
FROM user_source
WHERE owner='<owner_name>'
AND name ='<procedure_name>'
AND type ='PROCEDURE';
make sure you put the owner_name and procedure_name in UPPERcase, or in the exact case if you created using double-quotation marks.
确保您将 owner_name 和 procedure_name 放在大写字母中,或者如果您使用双引号创建,则使用精确大小写。