只是想写一个存储过程来实现这样一句SQL查询:
select * from user_tt where t_age>35;
看我写的(别笑我哈,刚接触ORACLE)
create or replace procedure test_pro
is
begin
select * from user_tt where t_age>35;
end;
通不过,不知错在哪里。。。帮帮忙吧~~~~
...全文
1198打赏收藏
卡住了 求助
只是想写一个存储过程来实现这样一句SQL查询: select * from user_tt where t_age>35; 看我写的(别笑我哈,刚接触ORACLE) create or replace procedure test_pro is begin select * from user_tt where t_age>35; end; 通不过,不知错在哪里。。。帮帮忙吧~~~~
不知道二楼的能否执行,如果是在存储过程中使用查询都是select into 一起使用的,select into就是将查询到的值赋给一个变量,如
[code=SQL]
CREATE OR REPLACE RROCEDURE PROC_SELECT
IS
S_ID INTEGER;
BEGIN
SELECT T.ID INTO S_ID FROM user_tt T where t_age>35;
END;
[/CODE]