OracleϵÄÖÐÎÄÅÅÐò
alter session set nls_sort='schinese_pinyin_m';
select * from dept order by
nlssort(name,'NLS_SORT=SCHINESE_PINYIN_M');
Oracle9i֮ǰ£¬ÖÐÎÄÊÇ°´ÕÕ¶þ½øÖƱàÂë½øÐÐÅÅÐòµÄ¡£
ÔÚoracle9iÖÐÐÂÔöÁË°´ÕÕÆ´Òô¡¢²¿Êס¢±Ê»
ÅÅÐò¹¦ÄÜ¡£ÉèÖÃNLS_SORTÖµ
SCHINESE_RADICAL_M °´ÕÕ²¿Ê×£¨µÚһ˳Ðò£©¡¢±Ê»®£¨µÚ¶þ˳Ðò£©ÅÅÐò
SCHINESE_STROKE_M
°´Õձʻ®£¨µÚһ˳Ðò£©¡¢²¿Ê×£¨µÚ¶þ˳Ðò£©ÅÅÐò
SCHINESE_PINYIN_M °´ÕÕÆ´ÒôÅÅÐò£¬ÏµÍ³µÄĬÈÏÅÅÐò·½Ê½ÎªÆ´ÒôÅÅÐò
¾Ù
ÀýÈçÏ£º
±íÃûΪ dept £¬ÆäÖÐname×Ö¶ÎÊÇÖÐÎÄ£¬ÏÂÃæ·Ö±ðʵÏÖ°´ÕÕµ¥Î»Ãû³ÆµÄ±Ê»®¡¢²¿Ê׺ÍÆ´ÒôÅÅÐò¡£
1: //°´Õձʻ®ÅÅÐò
2:
select * from dept order by
nlssort(name,'NLS_SORT=SCHINESE_STROKE_M');
3: //°´ÕÕ²¿Ê×ÅÅÐò
4: select
* from dept order by nlssort(name,'NLS_SORT=SCHINESE_RADICAL_M');
5:
//°´ÕÕÆ´ÒôÅÅÐò£¬´ËΪϵͳµÄĬÈÏÅÅÐò·½Ê½
6: select * from dept order by
nlssort(name,'NLS_SORT=SCHINESE_PINYIN_M');
×¢Ò⣬¸Ã
SQLÖ¸Áî²¢·Ç±ê×¼Ö¸ÁÔÚSQLServerÏÂÃæµÄʵÏÖ·½Ê½²¢²»Ïàͬ¡£
ת×Ô£ºhttp://blog.chinaunix.net/u/28618/showart_464260.html
Ïà¹ØÎĵµ£º
ÒÔdbaµÇ½
1.²é¿´Äĸö±í±»Ëø:
select b.owner,b.object_name,l.session_id,l.locked_mode
from v$locked_object l, dba_objects b
where b.object_id=l.object_id;
2.²é¿´±»Ëø±íµÄsid ºÍserial# :
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1 ......
Ä¿Ç°£¬ÕýÔò±í´ïʽÒѾÔںܶàÈí¼þÖеõ½¹ã·ºµÄÓ¦Ó㬰üÀ¨*nix£¨Linux, UnixµÈ£©£¬HPµÈ²Ù×÷ϵͳ£¬PHP£¬C#£¬JavaµÈ¿ª·¢»·¾³¡£
Oracle 10gÕýÔò±í´ïʽÌá¸ßÁËSQLÁé»îÐÔ¡£ÓÐЧµÄ½â¾öÁËÊý¾ÝÓÐЧÐÔ£¬ Öظ´´ÊµÄ±æÈÏ, Î޹صĿհ׼ì²â£¬»òÕß·Ö½â¶à¸öÕýÔò×é³É
µÄ×Ö·û´®µÈÎÊÌâ¡£
Oracle 10gÖ§³ÖÕýÔò±í´ïʽµÄËĸöк¯Êý·Ö±ðÊÇ£ºREGEXP_L ......
¾¡Á¿ÉÙÓÃIN²Ù×÷·û£¬»ù±¾ÉÏËùÓеÄIN²Ù×÷·û¶¼¿ÉÒÔÓÃEXISTS´úÌæ¡£
²»ÓÃNOT IN²Ù×÷·û£¬¿ÉÒÔÓÃNOT EXISTS»òÕßÍâÁ¬½Ó+Ìæ´ú¡£
OracleÔÚÖ´ÐÐIN×Ó²éѯʱ£¬Ê×ÏÈÖ´ÐÐ×Ó²éѯ£¬½«²éѯ½á¹û·ÅÈëÁÙʱ±íÔÙÖ´ÐÐÖ÷²éѯ¡£¶øEXISTÔòÊÇÊ×Ïȼì²éÖ÷²éѯ£¬È»ºóÔËÐÐ×Ó²éѯֱµ½ÕÒµ½µÚÒ»¸öÆ¥ÅäÏî¡£NOT EXISTS±ÈNOT INЧÂÊÉԸߡ£µ«¾ßÌåÔÚÑ¡ÔñIN»òEXIST² ......
Êý¾Ý×Öµädict×ÜÊÇÊôÓÚOracleÓû§sysµÄ¡£
¡¡¡¡1¡¢Óû§£º
¡¡¡¡¡¡select username from dba_users;
¡¡¡¡¸Ä¿ÚÁî
¡¡¡¡¡¡alter user spgroup identified by spgtest;
¡¡¡¡2¡¢±í¿Õ¼ä£º
¡¡¡¡¡¡select * from dba_data_files;
¡¡¡¡¡¡select * from dba_tablespaces;//±í¿Õ¼ä
¡¡¡¡¡¡select tablespace_name,sum(bytes), sum ......
½ñÌìͬÊÂraiseÒ»¸öСÎÊÌ⣬ÔõôÔÚALL_VIEWSÊý¾Ý×Öµätext×ֶβéÕÒlrf×Ö·û´®£º
etl@DWTEST> select owner,view_name from all_views where instr(text,'lrf') > 0;
select owner,view_name from all_views where instr(text,'lrf') > 0
  ......