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

oracle ³£Óú¯Êý

SQLÖеĵ¥¼Ç¼º¯Êý
1.ASCII
·µ»ØÓëÖ¸¶¨µÄ×Ö·û¶ÔÓ¦µÄÊ®½øÖÆÊý;
SQL> select ascii(’A’) A,ascii(’a’) a,ascii(’0’) zero,ascii(’ ’) space from dual;
A A ZERO SPACE
--------- --------- --------- ---------
65 97 48 32
2.CHR
¸ø³öÕûÊý,·µ»Ø¶ÔÓ¦µÄ×Ö·û;
SQL> select chr(54740) zhao,chr(65) chr65 from dual;
ZH C
-- -
ÕÔ A
3.CONCAT
Á¬½ÓÁ½¸ö×Ö·û´®;
SQL> select concat(’010-’,’88888888’)||’ת23’ ¸ßǬ¾ºµç»° from dual;
¸ßǬ¾ºµç»°
----------------
010-88888888ת23
4.INITCAP
·µ»Ø×Ö·û´®²¢½«×Ö·û´®µÄµÚÒ»¸ö×Öĸ±äΪ´óд;
SQL> select initcap(’smith’) upp from dual;
UPP
-----
Smith
5.INSTR(C1,C2,I,J)
ÔÚÒ»¸ö×Ö·û´®ÖÐËÑË÷Ö¸¶¨µÄ×Ö·û,·µ»Ø·¢ÏÖÖ¸¶¨µÄ×Ö·ûµÄλÖÃ;
C1 ±»ËÑË÷µÄ×Ö·û´®
C2 Ï£ÍûËÑË÷µÄ×Ö·û´®
I ËÑË÷µÄ¿ªÊ¼Î»ÖÃ,ĬÈÏΪ1
J ³öÏÖµÄλÖÃ,ĬÈÏΪ1
SQL> select instr(’oracle traning’,’ra’,1,2) instring from dual;
INSTRING
---------
9
6.LENGTH
·µ»Ø×Ö·û´®µÄ³¤¶È;
SQL> select name,length(name),addr,length(addr),sal,length(to_char(sal)) from gao.nchar_tst;
NAME LENGTH(NAME) ADDR LENGTH(ADDR) SAL LENGTH(TO_CHAR(SAL))
------ ------------ ---------------- ------------ --------- --------------------
¸ßǬ¾º 3 ±±¾©Êк£¶§Çø 6 9999.99 7
7.LOWER
·µ»Ø×Ö·û´®,²¢½«ËùÓеÄ×Ö·ûСд
SQL> select lower(’AaBbCcDd’)AaBbCcDd from dual;
AABBCCDD
--------
aabbccdd
8.UPPER
·µ»Ø×Ö·û´®,²¢½«ËùÓеÄ×Ö·û´óд
SQL> select upper(’AaBbCcDd’) upper from dual;
UPPER
--------
AABBCCDD
9.RPADºÍLPAD(Õ³Ìù×Ö·û)
RPAD ÔÚÁеÄÓÒ±ßÕ³Ìù×Ö·û
LPAD ÔÚÁеÄ×ó±ßÕ³Ìù×Ö·û
SQL> select lpad(rpad(’gao’,10,’*’),17,’*’)from dual;
LPAD(RPAD(’GAO’,1
-----------------
*******gao*******
²»¹»×Ö·ûÔòÓÃ*À´ÌîÂú
10.LTRIMºÍRTRIM
LTRIM ɾ³ý×ó±ß³öÏÖµÄ×Ö·û´®
RTRIM ɾ³ýÓұ߳öÏÖµÄ×Ö·û´®
SQL> select ltrim(rtrim(’ gao qian jing ’,’


Ïà¹ØÎĵµ£º

Oracle »ñÈ¡µ±Ç°ÈÕÆÚ¼°ÈÕÆÚ¸ñʽ

Oracle »ñÈ¡µ±Ç°ÈÕÆÚ¼°ÈÕÆÚ¸ñʽ
   »ñȡϵͳÈÕÆÚ£º  SYSDATE()
   ¸ñʽ»¯ÈÕÆÚ£º     TO_CHAR(SYSDATE(),'YY/MM/DD HH24:MI:SS)
                      » ......

Java+OracleÓ¦Óÿª·¢µÄ¼¸¸öÎÊÌâ


ÎÊÌâÒ»£ºÈç±£¼ÓÔØJDBCÇý¶¯³ÌÐò£º
¡¡¡¡Õý³£ÎÒÃǼÓÔØÇý¶¯³ÌÐòÓÐÈý¸ö;¾¶£º
¡¡¡¡1£©Class.forName(String)ÕâÏëµ±ÓÚclassLoaderÒ»¸öStringÖ¸¶¨µÄÀ࣬ÔÚ×°ÔØʱ°Ñ¸ÃÇý¶¯³ÌÐòµÄ¾²Ì¬ÄÚÈݶ¼³õʼ»¯£¬ÆäʵÕâʱÇý¶¯³ÌÐòÀàµ÷ÓÃÁËDriverManager.registerDriver(driver)·½·¨
¡¡¡¡2£©Ê¹ÓÃϵͳÊôÐÔ£ºSystem.getProperty().load(new Fil ......

ORACLEÖÐÁÙʱÎļþºÍÊý¾ÝÎļþµÄÇø±ð

Õâ¸öÎÊÌâÒÔÇ°À§ÈŹýÎÒ£¬Á½Õߺó׺Ãû¶¼ÊÇ.DBF¡£¼ÇµÃµ±Ê±ºÃÏñÈ¥ÂÛ̳ÉÏ·¢Á˸öÌû×ÓÎÊ£¬²»¹ýºÃ¼¸ÌìûÈ˽â´ð£¬ÎÞÄÎÖ®ÏÂÎҾͰÑÌû×Ó¸ø½áÁË¡£
½ñÌìÕýºÃÔÚÒ»±¾ÊéÖп´µ½Óн²Á½ÕßÇø±ðµÄ£¬ÓÖÈ¥ÍøÉÏËÑÁËËÑ£¬Ð¡×ܽáһϣ¬¼ÇÏÂÀ´¡£
±¾µØ¹ÜÀíµÄÁÙʱ±í¿Õ¼äÊÇ»ùÓÚÁÙʱÎļþµÄ£¬ÕâЩÎļþÓëÆÕͨµÄÊý¾ÝÎļþ·Ç³£ÏàËÆ£¬µ«ËüÃÇ»¹¾ßÓÐÈçÏÂÌØÐÔ£º
ÁÙʱ ......

Oracle °²×°ÏµÁÐ ¾²Ä¬°²×°Êý¾Ý¿âÈí¼þ

ÔںܶàÆóÒµ¼¶°²×°Êý¾Ý¿âʱ£¬³£³£Óдó¹æÄ£µÄ°²×°ÈÎÎñ£¬ÕâʱʹÓÃÏìÓ¦ÎļþÀ´ÅúÁ¿°²×°¿ÉÒÔÌá¸ß¹¤×÷ЧÂÊ£¬ÏÂÃæ½éÉÜÊý¾Ý¿âÈí¼þµÄ¾²Ä¬°²×°·½Ê½¡£
Ò»¡¢Êý¾Ý¿â·þÎñÆ÷¶Ë°²×°
1. Éú³É°²×°ÏìÓ¦Îļþ
$./runInstaller -record -destinationFile /tmp/install_database_10g.rsp
Õâʱ»áÆô¶¯Í¼ÐνçÃæÀ´Â¼ÖÆÎÒÃÇÐèÒªµÄÏìÓ¦Îļþ¡£
×¢Ò⣺ ......

OracleÊÕ¹ºSunÈôʧ°Ü IBMÊÇ·ñÔÙÅ×éÏé­Ö¦

¡¶¸£²¼Ë¹¡·ÍøÕ¾½üÈÕ·¢±íÎÄÕ³ƣ¬Èç¹û¼×¹ÇÎÄ74ÒÚÃÀÔªÊÕ¹ºSunµÄ¼Æ»®ÓÉÓÚÅ·Ã˵Ä×èÄÓ¶øÒÔʧ°Ü¸æÖÕ£¬Õâ²¢²»»á¸ø¼×¹ÇÎÄ´øÀ´Ì«´óËðʧ£¬µ«È´»áÁîSunÔâÊÜÖØ´´¡£
¼×¹ÇÎÄÊÕ¹ºSunµÄ½»Ò×ÈÔδ»ñµÃÅ·ÃËίԱ»áµÄÅú×¼¡£
Å·ÃË·´Â¢¶Ï¼à¹Ü²¿Ãŵ£ÐÄ£¬¼×¹ÇÎÄÊÕ¹ºSun½«¶ÔSunµÄ¿ªÔ´Êý¾Ý¿âÒµÎñMySQLÔì³É²»ÀûÓ°Ïì¡£¼×¹ÇÎÄÃæ¶ÔÅ·Ã˵ÄÒÉÂDz¢²»Ô¸×ö³öÈà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ