Rumah > pangkalan data > tutorial mysql > oracle 存储过程 出错

oracle 存储过程 出错

WBOY
Lepaskan: 2016-06-07 15:36:40
asal
1502 orang telah melayarinya

* ERROR at line 1: ORA-06550: line 1, column 7: PLS-00221: 'GET_SAL' is not a procedure or is undefined ORA-06550: line 1, column 7: PL/SQL: Statement ignored 出现类这样的错误,是因为没有将返回赋给一个 ,因此 f you want to execute a functi

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: 'GET_SAL' is not a procedure or is undefined
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

出现类似这样的错误,是因为没有将返回值赋给一个值 ,因此

f you want to execute a function you have to collect the return value into a variable.

So you need to define a variable and execute function to return into the variable as below

and run it using the run Script option not the Run Statement option.

<code><span>variable ret varchar2</span><span>(</span><span>20</span><span>);</span><span>execute</span><span>:</span><span>ret</span><span>:=</span><span>check_login</span><span>(</span><span>dd</span><span>,</span><span>dd</span><span>);</span><span>select</span><span>:</span><span>ret </span><span>from</span><span> dual</span></code>
Salin selepas log masuk

Or if you do it from plsql

<code><span>declare</span><span>  v_ret varchar2</span><span>(</span><span>100</span><span>);</span><span>begin</span><span>

  v_ret</span><span>:=</span><span>check_login</span><span>(</span><span>a</span><span>,</span><span>b</span><span>);</span><span>end</span><span>;</span></code>
Salin selepas log masuk

Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan