oracle 如何在 Oracle10g for Linux 中运行 PL/SQL 程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3589760/
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
How to run PL/SQL program in Oracle10g for Linux
提问by Jagan
BEGIN
dbms_output.put_line('Welcome to PL/SQL');
END;
/
I have this code in sample.sql
file.
How to run sample.sql
?
我在sample.sql
文件中有这个代码。
怎么跑sample.sql
?
回答by Peter Lang
You can run it using SQL*Plus(using your username
/password
and the name of your instance):
您可以使用SQL*Plus运行它(使用您的username
/password
和您的实例名称):
sqlplus username/password@instance @ sample.sql
Another way would be to download free SQL Developerfrom Oracle, open and execute the file there.
另一种方法是从 Oracle下载免费的SQL Developer,在那里打开并执行文件。
Note that the text will not be displayed per default, you need to enable the outputbefore.
请注意,默认情况下不会显示文本,您需要先启用输出。
Put the following line into your file as first line:
将以下行作为第一行放入您的文件中:
SET SERVEROUTPUT ON