SELECT Max(P002),Min(P002),Avg(P002) INTO vP002,vP003,vP004 FROM DBA2003_T;
一执行就提示我缺少关键字,vP002,vP003,vP004这几个变量我都定义了啊.
------解决方案--------------------
你在哪运行这个sql的
直接运行不能写into ,去掉
存储过程中可以写的
------解决方案--------------------
SQL> declare
2 vP002 number;
3 vP003 number;
4 vP004 number;
5 begin
6 SELECT Max(salary),Min(salary),Avg(salary) INTO vP002,vP003,vP004 FROM emp;
7 dbms_output.put_line(vP002|| '/ '||vP003|| '/ '||vP004);
8 end ;
9 /
1200/1200/1200
PL/SQL procedure successfully completed
SQL>