今天写需求,要求将结果按照成本中心首字母排序,平且空放在最前面. 进入正题: 1.使用oracle自带的函数: 按照首字母排序:nlssort(xxx,'NLS_SORT=SCHINESE_PINYIN_M') 例如:select * from qin t order by nlssort(t.ename,'NLS_SORT=SCHINESE_PINYIN_M'); 将空值放在最前面只需要加上 nulls first 例如:select * from qin t order by nlssort…
一.ORACLE 10g批量刷新用户密码 select 'alter user ' || username ||' identified by values '''||password ||''';' from dba_users where ACCOUNT_STATUS<>'LOCK' and ACCOUNT_STATUS not like 'EXPIRED%LOCKED'; 或者 select 'alter user ' || username || ' identified by val…