在sqldeveloper中学习plsql
我刚刚开始学习PLSQL。我只有 SQLDEVELOPER 来访问 Oracle 数据库。
当我运行以下代码时:
DECLARE
title VARCHAR(8);
salary NUMBER;
BEGIN
title := 'DBA';
salary := 50000;
DBMS_OUTPUT.PUT_LINE('Job Title: '|| title);
DBMS_OUTPUT.PUT_LINE('Expected Salary'|| TO_CHAR(salary));
END;
/
我得到输出“匿名块已完成”。
另外,在运行命令“set serveroutput on”时,我得到空白输出。
我还有其他选择是下载 oracle 数据库快捷版并安装在本地系统上。
I just started to learn PLSQL. I had only SQLDEVELOPER to access Oracle Database.
When I run following code:
DECLARE
title VARCHAR(8);
salary NUMBER;
BEGIN
title := 'DBA';
salary := 50000;
DBMS_OUTPUT.PUT_LINE('Job Title: '|| title);
DBMS_OUTPUT.PUT_LINE('Expected Salary'|| TO_CHAR(salary));
END;
/
I get the output "anonymous block completed"
.
Also, On running the command "set serveroutput on", I get a blank output.
I had other option is to download oracle database express edition and install on the local system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 SQL Developer 中有一个菜单选项
View -> Dbms 输出
您需要遵循该输出来为数据库连接设置服务器输出。完成后,您将看到 DBMS Output 窗口窗格,然后您需要单击绿色加号
"+"
图标为您的连接启用服务器输出。除此之外,你还没有问过具体的问题......
In SQL Developer there is a menu option
View -> Dbms output
which you need to follow to set the serveroutput on for your database connection.Once done, you will see the DBMS Output window pane, you then need to click the green plus
"+"
icon to enable serveroutput for your connection.Other than that, you haven't asked a specific question....
放在这行代码的上方:
SET SERVEROUTPUT ON
put just above this line of code :
SET SERVEROUTPUT ON