为什么打印“X”而不是价值?我该如何打印该值?

时间:2018-03-21 09:15:50

标签: plsql

{{1}}

1 个答案:

答案 0 :(得分:0)

为我打印价值......

SQL> var x number
SQL> exec :x := 10

PL/SQL procedure successfully completed.

SQL> DECLARE
  2     a   CONSTANT NUMBER := 3;
  3     b            NUMBER NOT NULL := 5;
  4  BEGIN
  5     :X := :X + a + b + 3;
  6  END;
  7  /

PL/SQL procedure successfully completed.

SQL> print :x

         X
----------
        21

SQL>