您当前的位置: 首页 >  童心同萌 oracle

Oracle中if...then...else的使用

童心同萌 发布时间:2019-02-13 11:10:01 ,浏览量:3

set serveroutput on
declare
  a varchar2(10);
  b varchar2(20);
begin
  a:='qwer';
  b:='qwerqwer';
  if length(a)>length(b) then 
    dbms_output.put_line('字符串"'||a||'"的长度比字符串"'||b||'"的长度大');
  else
    dbms_output.put_line('字符串"'||a||'"的长度比字符串"'||b||'"的长度小');
  end if;
end;

 

关注
打赏
查看更多评论

童心同萌

暂无认证

  • 3浏览

    0关注

    87博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录