create or replace procedure test_select
as
begin
--select * from test_table t where t.subsystem_id = 4
dbms_system.output_line('this is my first proc in oracle !');
end
------解决方案-------------------- 举个例子如下:
CREATE OR REPLACE PROCEDURE secure_dml
IS
BEGIN
IF TO_CHAR (SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00'
OR TO_CHAR (SYSDATE, 'DY') IN ('SAT', 'SUN') THEN
RAISE_APPLICATION_ERROR (-20205,
'You may only make changes during normal office hours');
END IF;
END secure_dml;
------解决方案-------------------- oracle的存储过程是不支持简单的select ... from...输出结果集的,不同于sql server ------解决方案--------------------
加上分号 ;试试 ------解决方案-------------------- 怎么可能啊,网上一着,多得是啊,慢慢来存储过程不难的 ------解决方案-------------------- /*下面这个例子是我有emp表,经过测试没有问题,希望能帮到你*/
create or replace procedure sp_pro1(spname emp.ename%type,newsal emp.sal%type) is
begin
update emp set sal=newsal where ename=spname;
end;
/
exec sp_pro1('scott',1000); ------解决方案-------------------- 用 call 吧
要不用plsql连接工具 可以设这断点调试 我的异常网推荐解决方案:oracle存储过程,http://www.aiyiweb.com/oracle-develop/177537.html