oracle循环的几种写法:declarex number :=5;begin--x:=0;loopx:=x+1;/*if (x=10) then exit; end if;*/exit when x=10;dbms_output.put_line('x='||x);end loop;dbms_output.put_line('outer');end;/------------------------------declarex number :=5;beginwhile x<10 loopx:=x+1;dbms_output.put_line(' Read More
DECODE语法:SELECT DECODE( <EXPR,SEARCH1,RESULT1,SEARCH2,RESULT2,...[,DEFAULT]>)FROM <TABLE_NAME>e.g.:select orderno,decode(ostatus,'p','准备处理','c','已完成')from order_master此函数可用于行转列:select * from scoreSELECT u_id, stu_name, SUM (DECODE (score_type, '语文' Read More