<legend id='A6Dv6'><style id='A6Dv6'><dir id='A6Dv6'><q id='A6Dv6'></q></dir></style></legend>
    <bdo id='A6Dv6'></bdo><ul id='A6Dv6'></ul>
  • <tfoot id='A6Dv6'></tfoot>

    <small id='A6Dv6'></small><noframes id='A6Dv6'>

      <i id='A6Dv6'><tr id='A6Dv6'><dt id='A6Dv6'><q id='A6Dv6'><span id='A6Dv6'><b id='A6Dv6'><form id='A6Dv6'><ins id='A6Dv6'></ins><ul id='A6Dv6'></ul><sub id='A6Dv6'></sub></form><legend id='A6Dv6'></legend><bdo id='A6Dv6'><pre id='A6Dv6'><center id='A6Dv6'></center></pre></bdo></b><th id='A6Dv6'></th></span></q></dt></tr></i><div id='A6Dv6'><tfoot id='A6Dv6'></tfoot><dl id='A6Dv6'><fieldset id='A6Dv6'></fieldset></dl></div>
      1. 在 SQL Developer 中打印变量的值

        Printing the value of a variable in SQL Developer(在 SQL Developer 中打印变量的值)
        <tfoot id='NoI6g'></tfoot>
        <i id='NoI6g'><tr id='NoI6g'><dt id='NoI6g'><q id='NoI6g'><span id='NoI6g'><b id='NoI6g'><form id='NoI6g'><ins id='NoI6g'></ins><ul id='NoI6g'></ul><sub id='NoI6g'></sub></form><legend id='NoI6g'></legend><bdo id='NoI6g'><pre id='NoI6g'><center id='NoI6g'></center></pre></bdo></b><th id='NoI6g'></th></span></q></dt></tr></i><div id='NoI6g'><tfoot id='NoI6g'></tfoot><dl id='NoI6g'><fieldset id='NoI6g'></fieldset></dl></div>

        <legend id='NoI6g'><style id='NoI6g'><dir id='NoI6g'><q id='NoI6g'></q></dir></style></legend>

          <small id='NoI6g'></small><noframes id='NoI6g'>

            <bdo id='NoI6g'></bdo><ul id='NoI6g'></ul>
                <tbody id='NoI6g'></tbody>
                • 本文介绍了在 SQL Developer 中打印变量的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想打印匿名块内特定变量的值.我正在使用 Oracle SQL Developer.我尝试使用 dbms_output.put_line.但它不起作用.我正在使用的代码如下所示.

                  I wanted to print the value of a particular variable which is inside an anonymous block. I am using Oracle SQL Developer. I tried using dbms_output.put_line. But it is not working. The code which I am using is shown below.

                  SET SERVEROUTPUT ON
                  
                  DECLARE
                  
                    CTABLE USER_OBJECTS.OBJECT_NAME%TYPE;
                    CCOLUMN ALL_TAB_COLS.COLUMN_NAME%TYPE;
                    V_ALL_COLS VARCHAR2(500);
                  
                    CURSOR CURSOR_TABLE
                      IS
                      SELECT OBJECT_NAME 
                      FROM USER_OBJECTS 
                      WHERE OBJECT_TYPE='TABLE'
                      AND OBJECT_NAME LIKE 'tb_prm_%';
                  
                    CURSOR CURSOR_COLUMNS (V_TABLE_NAME IN VARCHAR2)
                      IS
                      SELECT COLUMN_NAME
                      FROM ALL_TAB_COLS
                      WHERE TABLE_NAME = V_TABLE_NAME;
                  
                  BEGIN
                  
                    OPEN CURSOR_TABLE;
                  
                    LOOP
                      FETCH CURSOR_TABLE INTO CTABLE;
                      EXIT WHEN CURSOR_TABLE%NOTFOUND;
                  
                      OPEN CURSOR_COLUMNS (CTABLE);
                  
                      V_ALL_COLS := NULL;
                  
                      LOOP
                        FETCH CURSOR_COLUMNS INTO CCOLUMN;
                        V_ALL_COLS := V_ALL_COLS || CCOLUMN;
                        IF CURSOR_COLUMNS%FOUND THEN
                          V_ALL_COLS := V_ALL_COLS || ', ';
                        ELSE
                          EXIT;
                        END IF;
                      END LOOP;
                  
                      DBMS_OUTPUT.PUT_LINE(V_ALL_COLS);
                  
                    END LOOP;
                    CLOSE CURSOR_TABLE;
                  
                  END;
                  

                  而且我只在匿名块完成时获得输出.

                  And I am getting the output only as anonymous block completed.

                  推荐答案

                  您需要打开 dbms_output.在 Oracle SQL Developer 中:

                  You need to turn on dbms_output. In Oracle SQL Developer:

                  1. 显示 DBMS 输出窗口(视图->DBMS 输出).
                  2. 按Dbms 输出"窗口顶部的+"按钮,然后在打开的对话框中选择一个打开的数据库连接.

                  在 SQL*Plus 中:

                  In SQL*Plus:

                   SET SERVEROUTPUT ON
                  

                  这篇关于在 SQL Developer 中打印变量的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Oracle PL/SQL - Raise User-Defined Exception With Custom SQLERRM(Oracle PL/SQL - 使用自定义 SQLERRM 引发用户定义的异常)
                  Oracle: is there a tool to trace queries, like Profiler for sql server?(Oracle:是否有跟踪查询的工具,例如用于 sql server 的 Profiler?)
                  SELECT INTO using Oracle(使用 Oracle SELECT INTO)
                  How to handle Day Light Saving in Oracle database(如何在 Oracle 数据库中处理夏令时)
                  PL/SQL - Use quot;Listquot; Variable in Where In Clause(PL/SQL - 使用“列表Where In 子句中的变量)
                  Oracle: Import CSV file(Oracle:导入 CSV 文件)
                      <bdo id='yhCBi'></bdo><ul id='yhCBi'></ul>
                          <tfoot id='yhCBi'></tfoot>

                          <small id='yhCBi'></small><noframes id='yhCBi'>

                          <i id='yhCBi'><tr id='yhCBi'><dt id='yhCBi'><q id='yhCBi'><span id='yhCBi'><b id='yhCBi'><form id='yhCBi'><ins id='yhCBi'></ins><ul id='yhCBi'></ul><sub id='yhCBi'></sub></form><legend id='yhCBi'></legend><bdo id='yhCBi'><pre id='yhCBi'><center id='yhCBi'></center></pre></bdo></b><th id='yhCBi'></th></span></q></dt></tr></i><div id='yhCBi'><tfoot id='yhCBi'></tfoot><dl id='yhCBi'><fieldset id='yhCBi'></fieldset></dl></div>
                            <tbody id='yhCBi'></tbody>

                            <legend id='yhCBi'><style id='yhCBi'><dir id='yhCBi'><q id='yhCBi'></q></dir></style></legend>