declare
stuno xs.sno%type;
stuname xs.sname%type;
begin
select sno,sname into stuno,stuname from xs where sno='001101';
dbms_output.put_line(stuno||stuname);
end;
执行结果:
原因:未打开SERVEROUTPUT;
更改后:
set SERVEROUTPUT ON;
declare
stuno xs.sno%type;
stuname xs.sname%type;
begin
select sno,sname into stuno,stuname from xs where sno='001101';
dbms_output.put_line(stuno||stuname);
end;
/
新的结果
问题得到解决;