Home  >  Article  >  Database  >  Oracle中存储过程执行大的Sql语句时如何查看sql是否正确

Oracle中存储过程执行大的Sql语句时如何查看sql是否正确

WBOY
WBOYOriginal
2016-06-07 16:22:401529browse

在Oracle中编写一个存储过程中,有时会用到较大的sql语句,但是通过PL/sql工具Test查看时又不能看到sql的样子,通过查看发现可以通过Oracle的物理临时表来处理, 在存储过程中添加DBMS_OUTPUT.put_line(要输出的Sql语句); 然后在PL/sql工具中选中存储过程,

   在Oracle中编写一个存储过程中,有时会用到较大的sql语句,但是通过PL/sql工具Test查看时又不能看到sql的样子,通过查看发现可以通过Oracle的物理临时表来处理,

  在存储过程中添加DBMS_OUTPUT.put_line(‘要输出的Sql语句’);

  然后在PL/sql工具中选中存储过程,右键选择Test执行,执行完成后可以通过DBMS_OUTPUT窗口查看sql结果了,很实用的

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn