1.order by 与rownum
如果非主键排序则会先生成rownum 再order by
2.以下解决方法也可以使用rownum()函数
select row_number() over(order by 非主键列 desc) rn from table_name
3.case when
then
else
end
3.cursor(cursor cursor_x is select * from user)
-- for 'xxxxx' in cursor_x loop
end loop;
--
--带参数 :CURSOR C_USER(C_ID NUMBER) IS SELECT NAME FROM USER WHERE TYPEID=C_ID;