if判断语句

mac2022-06-30  29

6)if判断语句   if ... then   else   end if;     if ... then   elsif ... then   elsif ... then   else   end if;     declare     sex char(1) := 'M';   begin     if sex='M' then      dbms_output.put_line('支持文章');     elsif sex='F'then      dbms_output.put_line('支持马伊琍');     else      dbms_output.put_line('支持姚笛');     end if;   end;   /   //有一个NUMBER(3)变量, 如果大于0显示1; 如果小于0显示-1; 如果等于0显示0; declare   n number(3) :=10; begin   if n>0 then     dbms_output.put_line(1);   elsif n<0 then     dbms_output.put_line(-1);   else     dbms_output.put_line(0);   end if; end; /

转载于:https://www.cnblogs.com/yunman/p/5497847.html

最新回复(0)