oracleÖÐTranslate()º¯ÊýÓ÷¨
Ò»¡¢Óï·¨£º
TRANSLATE(string,from_str,to_str)
¶þ¡¢Ä¿µÄ
·µ»Ø½«£¨ËùÓгöÏֵģ©from_strÖеÄÿ¸ö×Ö·ûÌ滻Ϊto_strÖеÄÏàÓ¦×Ö·ûÒÔºóµÄstring¡£TRANSLATEÊÇREPLACEËùÌṩµÄ¹¦ÄܵÄÒ»¸ö³¬¼¯¡£Èç¹ûfrom_str±È to_str³¤£¬ÄÇôÔÚfrom_strÖжø²»ÔÚto_strÖеĶîÍâ×Ö·û½«´ÓstringÖб»É¾³ý£¬ÒòΪËüÃÇûÓÐÏàÓ¦µÄÌæ»»×Ö·û¡£to_str²»ÄÜΪ¿Õ,Oracle½«¿Õ×Ö·û´®½âÊÍΪNULL£¬²¢ÇÒÈç¹ûTRANSLATEÖеÄÈκβÎÊýΪNULL£¬ÄÇô½á¹ûÒ²ÊÇNULL¡£
Èý¡¢ÔÊÐíʹÓõÄλÖÃ
¹ý³ÌÐÔÓï¾äºÍSQLÓï¾ä¡£
ËÄ¡¢Ê¾Àý
SELECT TRANSLATE('abcdefghij','abcdef','123456') from dual;
TRANSLATE
--------------
123456ghij
SELECT TRANSLATE('abcdefghij','abcdefghij','123456') from dual;
TRANSLATE
--------------
123456
select translate('smaspalae','as','s') from dual;
TRANSLATE
--------------
mspslse
select translate('smaspalae','s','as') from dual;
TRANSLATE
--------------
amaapalae
¿ÉÒÔ½«from_strÓëto_strÖеÄÿһ¸ö×Ö·û¶ÔÓ¦ÆðÀ´£¬ÓÃto_str×Ö·ûÈ¥Ìæ»»stringÖÐfrom_str¶ÔÓ¦µÄ×Ö·û£¬
ÀýÈçtranslate('smaspalae','as','s')ÓÃto_strÖеÄ's'È¥Ìæ»»'smaspalae'ÖÐfrom_str¶ÔÓ¦µÄ×Ö·û'a'£¬
to_strÖÐûÓÐ×Ö·ûÓëfrom_strÖÐ's'¶ÔÓ¦£¬¿ÉÒÔÀí½âΪto_str
Ïà¹ØÎĵµ£º
select dm_id, father_id, dm_name from gy_dmcode t
where level <= 2 --²ã¼¶
start with t.dm_id = '0' --¸ù½Úµã
connect by prior t.dm_id = t.father_id; --¶¨Òå¹Øϵ£¬prior ±íʾÓÅÏȼ¶ ......
Êý¾Ý×Öµä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(blocks)
from dba_free_s ......
Èç¹ûÔÚÊÂÎñÖÐÖ´ÐÐÁËÒ»Ìõ²»Âú×ãÌõ¼þµÄupdateÓï¾ä£¬ÔòÖ´ÐÐÈ«±íɨÃ裬°ÑÐм¶ËøÉÏÉýΪ±í¼¶Ëø£¬¶à¸öÕâÑùµÄÊÂÎñÖ´Ðк󣬾ͺÜÈÝÒײúÉúËÀËø¡£
ËÀËøÒ»°ãÊÇÒò×¾ÁÓµÄÊÂÎñÉè¼Æ¶ø²úÉú insert, update, delete
1.°´Óû§Óëϵͳ»®·Ö£¬¿ÉÒÔ·ÖΪ×Ô¶¯ËøÓëÏÔʾËø
×Ô¶¯Ëø£ºµ±½øÐÐÒ»ÏîÊý¾Ý¿â²Ù×÷ʱ£¬È±Ê¡Çé¿öÏ£¬ÏµÍ³×Ô¶¯Îª´ËÊý¾Ý¿â²Ù×÷»ñµÃËùÓ ......
Oracle 11gÓÚ2007Äê7ÔÂ11ÈÕÃÀ¹ú¶«²¿Ê±¼ä11ʱ£¨±±¾©Ê±¼ä11ÈÕ22ʱ£©Õýʽ·¢²¼£¬11gÊǼ׹ÇÎĹ«Ë¾30ÄêÀ´·¢²¼µÄ×îÖØÒªµÄÊý¾Ý¿â°æ±¾£¬¸ù¾ÝÓû§µÄÐèÇóʵÏÖÁËÐÅÏ¢ÉúÃüÖÜÆÚ¹ÜÀí£¨Information Lifecycle Management£©µÈ¶àÏС£
Ò»£®ÐÂÌØÐÔÌá¸Ù
1.Êý¾Ý¿â¹ÜÀí²¿·Ö
¡ôÊý¾Ý¿âÖØÑÝ(Database Replay)&nb ......