我本来想用select 列1 into aaa,列2 into bbb,列3 into ccc from 表但是报错现在只能
select 列1 into aaa from 表;
select 列2 into bbb from 表;
.
.
.
这么分开付值,这样不是要付多少个值就要查询几变么有什么方法可以快捷一点的挖?
select 列1 into aaa from 表;
select 列2 into bbb from 表;
.
.
.
这么分开付值,这样不是要付多少个值就要查询几变么有什么方法可以快捷一点的挖?
set serveroutput on;
declare dnamet varchar(20):='ACCOUNTING';
loc varchar(20):='ACCOUNTING';
idtag number:=0;
begin
dbms_output.put_line('dnamet:'||dnamet);
select DEPTNO,deptno into loc,idtag from dept where dname=dnamet;
dbms_output.put_line('loc:'||loc);
dbms_output.put_line(''||idtag);
end;
/
Connected as scottSQL> dnamet:ACCOUNTING
loc:10
10PL/SQL procedure successfully completedSQL> dnamet:ACCOUNTING
loc:10
10PL/SQL procedure successfully completedSQL>