plsql 注意事项

2.调试
如果plsql develope 工具调试存储时 始终是灰色,请考虑,本用户是否有调试存储的权限.
如果没有权限请执行以下sql语句
GRANT debug any procedure, debug connect session TO test;

3.plssql的一些总结
1).流程控制1
if 条件 then
执行语句
else if 条件 then
执行语句
else if 条件 then
执行语句
else
执行语句
end if;
2).流程控制2
1.case 检测
case 检测表达式
when value1 then
执行语句
when value2 then
执行语句
else
执行语句
end case;
2.case 搜索式
case
when 条件1 then
执行语句
when 条件2 then
执行语句
when 条件2 then
执行语句
else
执行语句
end case
3).循环
1. 简单循环
loop
执行语句
exite when 条件
end loop;

2.while 循环
while 条件 loop
执行语句
end loop;

3.for in循环
for 变量 in 下限..上限 loop
执行语句
end loop;

猜你喜欢

转载自wanxkl.iteye.com/blog/1567884