ORACLE带参数的存储过程和不带参数的存储过程

来源:互联网 发布:windows 7 toolkit 编辑:程序博客网 时间:2024/06/05 09:13

1.不带参数的存储过程

create or replace procedure mypro1 is
begin
insert into tb_test(myname) values('测试存储过程');
commit;
end;
/

调用的语句

 call mypro1();

2.带参数的存储过程

create procedure mypro2(num1 number)
is
begin
delete from tb_test where id=num1;
commit;
end;
/

调用的语句

call mypro2(1);

 

另外,当查询的行数小于表的总行数的10%时,创建索引就非常的有效。

原创粉丝点击