oracle - 批处理(sql语句块)
格式:
View Code
declare msg varchar2(32); p_name varchar2(32); outresult varchar2(64); begin p_name := 'xxxx'; select loginname into MSG from users where loginname = p_name and 1=2; dbms_output.put_line(MSG); exception when others then outresult := 'failure---' || sqlerrm || ' ' || p_name; dbms_output.put_line(outresult); end;
字符类型的变量必须声明其精度
一步一个脚印,方便自己复习,欢迎大家指正,非常感谢,共同进步!
posted on 2012-10-20 20:41 lovebeauty 阅读(3651) 评论(0) 编辑 收藏 举报