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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 21:23:36  来源:igfitidea点击:

How to run PL/SQL program in Oracle10g for Linux

oracleplsqloracle10g

提问by Jagan

BEGIN
  dbms_output.put_line('Welcome to PL/SQL');
END;
/

I have this code in sample.sqlfile.
How to run sample.sql?

我在sample.sql文件中有这个代码。
怎么跑sample.sql

回答by Peter Lang

You can run it using SQL*Plus(using your username/passwordand 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