存储过程2-变量的申明

这里展示存储过程中变量的申明以及赋值,首先还是按照创建语句来写。
create or replace procedure AAA_ceshi is
name varchar2(20);
dept varchar2(200);
money munber(20);
flag munber(20);
begin
name:=’张三’;

select count(1) into flag from tl_cjda_xz where name=’张三’
if flag>0 –查找到有数据
then
dbms_output.put_line(‘张三存在数据!’);
end if;

end AAA_ceshi;

猜你喜欢

转载自blog.csdn.net/weixin_42256811/article/details/81291068