oracle½ØÈ¡×Ö·û´®µÄº¯Êýsubstr
Óï·¨:
substr( string, start_position, [ length ] )
È¡×Ó×Ö·û´®,´Óstart_position¿ªÊ¼,È¡length¸ö,lengthΪ¿ÉÑ¡£¬Èç¹ûlengthΪ¿ÕÔò·µ»Østart_positionºóµÄËùÓÐ×Ö·û¡£
ʵÀý:
substr('This is a test', 6, 2) would return 'is'
substr('This is a test', 6) would return 'is a test'
substr('TechOnTheNet', 1, 4) would return 'Tech'
substr('TechOnTheNet', -3, 3) would return 'Net'
substr('TechOnTheNet', -6, 3) would return 'The'
substr('TechOnTheNet', -8, 2) would return 'On'
select substr('TechOnTheNet', -3, 2) from dual
start_positionΪ¸ºÊýʱ£¬±íʾ´Ó×Ö·û´®Î²°Íµ¹×ÅÊý
(thismonth)תÌù£ºhttp://hi.baidu.com/stanver/blog/item/710fbd1bae7e58118618bf31.html
Ïà¹ØÎĵµ£º
extent--×îС¿Õ¼ä·ÖÅ䵥λ --tablespace management
block --×îСi/oµ¥Î» --segment management
create tablespace james
datafile '/export/home/oracle/oradata/james.dbf'
size 100M ¡¡¡¡¡¡¡¡¡¡¡¡--³õʼµÄÎļþ´óС¡¡
autoextend On¡¡¡¡¡¡¡¡ --×Ô¶¯Ôö³¤
next 10M¡ ......
Oracle 10.2.0.1µÄPatchµµÖð½¥ÐγÉÁ˼Ò×åÌåϵÁË,ÏÖÔÚÈôó¼ÒÀ´ÈÏʶһÏÂÕâ¸öÌåϵ°É!µ½Ä¿Ç°Ëù·¢²¼µÄÖ÷ÒªµÄPatchÓÐ10.2.0.2,10.2.0.3,10.2.0.4,10.2.0.4.1,10.2.0.4.2,10.2.0.4.3,10.2.0.5.
֮ǰÔÚ32λºÍ64λLinuxϰ²×°Á˽ÏΪÎȶ¨µÄOracle 10G for Linux x86º ......
Óï·¨£ºTRANSLATE(expr,from,to)
expr: ´ú±íÒ»´®×Ö·û£¬from Óë to ÊÇ´Ó×óµ½ÓÒÒ»Ò»¶ÔÓ¦µÄ¹ØÏµ£¬Èç¹û²»ÄܶÔÓ¦£¬ÔòÊÓΪ¿ÕÖµ¡£
¾ÙÀý£º
select translate('abcbbaadef','ba','#@') from dual¡¡£¨b½«±»££Ìæ´ú£¬a½«±»£ÀÌæ´ú£©
select translate('abcbbaadef','bad','#@') from dual¡¡£¨b½«±»££Ìæ´ú£¬a½«±»£ÀÌæ´ú£¬d¶ÔÓ¦µÄÖµÊÇ¿Õ ......
Òì»ú»Ö¸´¹ý³Ì£º
ÔÚrman>run
{
allocate channel ch00 type 'sbt_tape' parms="ENV=(NB_ORA_CLIENT=zjddms1)";
set newname for datafile 1 to '/oradata/zjdms/1.dbf';
......
set newname for datafile 23 to '/oradata/test/23.dbf';
set newname for datafile 24 to '/oradata/test/24.dbf';
restore databas ......