Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLE³£ÓÃÊýÖµº¯Êý¡¢×ª»»º¯Êý¡¢×Ö·û´®º¯Êý½éÉÜ


µ¥Öµº¯ÊýÔÚ²éѯÖзµ»Øµ¥¸öÖµ£¬¿É±»Ó¦Óõ½select£¬where×Ӿ䣬start withÒÔ¼°connect by ×Ó¾äºÍhaving×Ӿ䡣
(Ò»).ÊýÖµÐͺ¯Êý(Number Functions)
    ÊýÖµÐͺ¯ÊýÊäÈëÊý×ÖÐͲÎÊý²¢·µ»ØÊýÖµÐ͵ÄÖµ¡£¶àÊý¸ÃÀຯÊýµÄ·µ»ØÖµÖ§³Ö38λСÊýµã£¬ÖîÈ磺COS, COSH, EXP, LN, LOG,
SIN, SINH, SQRT, TAN, and TANH Ö§³Ö36λСÊýµã¡£ACOS, ASIN, ATAN, and
ATAN2Ö§³Ö30λСÊýµã¡£
1¡¢MOD(n1,n2) ·µ»Øn1³ýn2µÄÓàÊý£¬Èç¹ûn2=0Ôò·µ»Øn1µÄÖµ¡£
    ÀýÈ磺SELECT MOD(24,5) from DUAL;
2¡¢ROUND(n1[,n2])
·µ»ØËÄÉáÎåÈëСÊýµãÓÒ±ßn2λºón1µÄÖµ£¬n2ȱʡֵΪ0£¬Èç¹ûn2Ϊ¸ºÊý¾ÍÉáÈ뵽СÊýµã×ó±ßÏàÓ¦µÄλÉÏ(ËäÈ»oracle
documentsÉÏÌáµ½n2µÄÖµ±ØÐëΪÕûÊý£¬ÊÂʵÉÏÖ´ÐÐʱ´Ë´¦µÄÅжϲ¢²»ÑϽ÷£¬¼´Ê¹n2Ϊ·ÇÕûÊý£¬ËüÒ²»á×Ô¶¯½«n2È¡Õûºó×ö´¦Àí£¬µ«ÊÇÎÒÎĵµÖÐÆäËüÌáµ½
±ØÐëΪÕûµÄµØ·½ÐèÒªÌرð×¢Ò⣬Èç¹û²»ÎªÕûÖ´ÐÐʱ»á±¨´íµÄ)¡£
ÀýÈ磺SELECT ROUND(23.56),ROUND(23.56,1),ROUND(23.56,-1) from DUAL;
3¡¢TRUNC(n1[,n2] ·µ»Ø½Øβµ½n2λСÊýµÄn1µÄÖµ£¬n2ȱʡÉèÖÃΪ0£¬µ±n2ΪȱʡÉèÖÃʱ»á½«n1½ØβΪÕûÊý£¬Èç¹ûn2Ϊ¸ºÖµ£¬¾Í½ØβÔÚСÊýµã×ó±ßÏàÓ¦µÄλÉÏ¡£
ÀýÈ磺SELECT TRUNC(23.56),TRUNC(23.56,1),TRUNC(23.56,-1) from DUAL;
(¶þ).×Ö·ûÐͺ¯Êý·µ»Ø×Ö·ûÖµ(Character Functions Returning Character Values)
¡¡¡¡¸ÃÀຯÊý·µ»ØÓëÊäÈëÀàÐÍÏàͬµÄÀàÐÍ¡£
? ·µ»ØµÄCHARÀàÐÍÖµ³¤¶È²»³¬¹ý2000×Ö½Ú£»
? ·µ»ØµÄVCHAR2ÀàÐÍÖµ³¤¶È²»³¬¹ý4000×Ö½Ú£»
Èç¹ûÉÏÊöÓ¦·µ»ØµÄ×Ö·û³¤¶È³¬³ö£¬oracle²¢²»»á±¨´í¶øÊÇÖ±½Ó½Ø¶ÏÖÁ×î´ó¿ÉÖ§³Ö³¤¶È·µ»Ø¡£
? ·µ»ØµÄCLOBÀàÐÍÖµ³¤¶È²»³¬¹ý4G£»
¶ÔÓÚCLOBÀàÐ͵ĺ¯Êý£¬Èç¹û·µ»ØÖµ³¤¶È³¬³ö£¬oracle²»»á·µ»ØÈκδíÎó¶øÊÇÖ±½ÓÅ׳ö´íÎó¡£
1¡¢LOWER(c) ½«Ö¸¶¨×Ö·û´®ÄÚ×Ö·û±äΪСд£¬Ö§³ÖCHAR,VARCHAR2,NCHAR,NVARCHAR2,CLOB,NCLOBÀàÐÍ
    ÀýÈ磺SELECT LOWER('WhaT is tHis') from DUAL;
2¡¢UPPER(c) ½«Ö¸¶¨×Ö·û´®ÄÚ×Ö·û±äΪ´óд£¬Ö§³ÖCHAR,VARCHAR2,NCHAR,NVARCHAR2,CLOB,NCLOBÀàÐÍ
    ÀýÈ磺SELECT UPPER('WhaT is tHis') from DUAL;
3¡¢LPAD(c1,n[,c2]) ·µ»ØÖ¸¶¨³¤¶È=nµÄ×Ö·û´®£¬ÐèҪעÒâµÄÓм¸µã£º
? Èç¹ûn<c1.lengthÔò´ÓÓÒµ½×ó½ØÈ¡Ö¸¶¨³¤¶È·µ»Ø£»
? Èç¹ûn>c1.length and c2 is null£¬ÒÔ¿Õ¸ñ´Ó×óÏòÓÒ²¹³ä×Ö·û³¤¶ÈÖÁn²¢·µ»Ø£»
? Èç¹ûn>c1.length and c2 is not null£¬ÒÔ


Ïà¹ØÎĵµ£º

Oracle±í¿Õ¼ä¹ÜÀí

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 ѧϰ֪ʶµã£¨Ò»£©

 Ò» µÇ¼SQLPLUS
    sqlplusÓû§Ãû/ÃÜÂë@Êý¾Ý¿âʵÀýasµÇ¼½ÇÉ«;
Èç:Óû§sys(ÃÜÂëΪ123)ÒÔsysdbaµÄ½ÇÉ«µÇ¼Êý¾Ý¿âORACL£¬ÎÒÃÇ¿ÉÒÔÊäÈ룺sqlplus sys/123@oracl as sysdba;
    ÕâÖֵǼ·½Ê½»áÖ±½Ó±©Â¶ÃÜÂ룬Èç¹ûÏëÒþ²ØÃÜÂ룬¿ÉÒÔÔÚ´ËÊ¡ÂÔÃÜÂëµÄÊäÈ룬È磺sqlplus sys@oracl as sysdb ......

ѧϰoracleµÚÒ»ÖÜ×ܽá

    ´ÓÉÏÖÜ¿ªÊ¼£¬ÎÒÏÂÔØÁËС²¼ÀÏʦµÄ½²¿ÎÊÓƵ£¬¿ªÊ¼ÁËѧϰORACLEµÄ¼Æ»®¡£
    ѧϰORACLEµÄÄ¿µÄ£¬Ò»·½ÃæÊÇÌá¸ß×Ô¼ºµÄ¼¼ÊõÄÜÁ¦£¬¹¤×÷ÉϾ­³£¿ÉÒÔÓõõ½£¨ËäÈ»²»ÊÇרÃÅDBAµÄ¹¤×÷£¬µ«ÊǾ­³£ÐèҪʹÓÃÊý¾Ý¿â×÷Ϊ±¨±íͳ¼Æ·ÖÎöµÄ¹¤¾ß£©£»ÁíÒ»·½Ã棬ҲÊÇΪÌø²Û×öºÃ¼¼ÊõÄÜÁ¦µÄ´¢±¸£¬ÏÖÔڵŤ×÷ÒѾ­¿ìÈ ......

Oracle 9iÖеÄXMLTYPEÓ¦ÓÃѧϰ

oracle´Ó9i¿ªÊ¼Ö§³ÖÒ»ÖÖеÄÊý¾ÝÀàÐÍ---- xmltype£¬ÓÃÓÚ´æ´¢ºÍ¹ÜÀíxmlÊý¾Ý£¬²¢ÌṩÁ˺ܶàµÄfunctions£¬ÓÃÀ´Ö±½Ó¶ÁÈ¡xmlÎĵµºÍ¹ÜÀí½Úµã¡£ÏÂÃ潫½éÉÜxmltypeµÄһЩ»ù±¾Ê¹Óá£
1.½¨Á¢º¬ÓÐxmltypeÊý¾ÝÀàÐ͵ıí
create table abc (id number,xmldoc sys.xmltype);
ÉùÃ÷xmltypeÐÍ×Ö¶ÎÓÃ:sys.xmltype
2.Ïò´øÓÐxmltypeÀàÐ͵ıí ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ