上面的复杂了,简单写一个,为什么总不行呀,请教了!!!
declaren_num integer:=2;
begin
if substr('hhhhhh',n_num,1)='h' then ---------就这儿不过,写的有问题吗
n_num:=n_num+1;
else
exit;
end if'; dbms_output.put_line(n_num);end;ORA-01756: 括号内的字符串没有正确结束
declaren_num integer:=2;
begin
if substr('hhhhhh',n_num,1)='h' then ---------就这儿不过,写的有问题吗
n_num:=n_num+1;
else
exit;
end if'; dbms_output.put_line(n_num);end;ORA-01756: 括号内的字符串没有正确结束
后面不是多一个单引号么?
declaren_num integer:=2;
begin
if substr('hhhhhh',n_num,1)='h' then ---------就这儿不过,写的有问题吗
n_num:=n_num+1;
else
exit;<----不能在这儿用.循环里面可以,这里你可以换成其他语句
end if';<--多单引号 dbms_output.put_line(n_num);end;