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 ',' '),' ') from dual;
LTRIM(RTRIM('
-------------
gao qian jing
11.SUBSTR(string,start,count)
È¡×Ó×Ö·û´®,´Óstart¿ªÊ¼,È¡count¸ö
SQL> select substr('13088888888',3,8) from dual;
SUBSTR('
--------
08888888
12.REPLACE('string','s1','s2')
string Ï£Íû±»Ìæ»»µÄ×Ö·û»ò±äÁ
Ïà¹ØÎĵµ£º
1.GSD global services daemon
oracle¹Ù·½ÎĵµµÄÃèÊö
The Global Services Daemon (GSD) runs on each node with one GSD process per node. The GSD coordinates with the cluster manager to receive requests from clients such as the DBCA, EM, and the SRVCTL utility to execute administrative ......
±¾ÊµÀýÒÑÍêȫͨ¹ý²âÊÔ,µ¥Ïò,ÓÖÏòͬ²½¶¼¿ÉʹÓÃ.
--Ãû´Ê˵Ã÷£ºÔ´——±»Í¬²½µÄÊý¾Ý¿â
Ä¿µÄ——Ҫͬ²½µ½µÄÊý¾Ý¿â
Ç°6²½±ØÐëÖ´ÐÐ,µÚ6ÒÔºóÊÇһЩ¸¨ÖúÐÅÏ¢.
--1¡¢ÔÚÄ¿µÄÊý¾Ý¿âÉÏ£¬´´½¨dblink
drop public database link dblink_or ......
select to_char(sysdate + 1 / (24 * 60),'yyyy/mm/dd hh24:mi:ss') from dual
SQL> ;
1 select to_char(sysdate, 'hh:mi:ss')
2 &nbs ......
oracleÊý¾Ý¿â²åÈëÈÕÆÚÐÍÊý¾Ý
ÍùOracleÊý¾Ý¿âÖвåÈëÈÕÆÚÐÍÊý¾Ý£¨to_dateµÄÓ÷¨£©
½ñÌìÅöµ½ÁËÐèÒªÍùOracleÊý¾Ý¿âÖвåÈëÈÕÆÚÐÍÊý¾Ý£¬ÒªÊ¹ÓÃTO_DATEº¯Êý£¬ÔÚÍøÉÏ·¢ÏÖһƪдµÄ²»´íµÄÎÄÕ£¬ÕªÀ´Ò»Æð·ÖÏí¡£
INSERT INTO FLOOR VALUES ( to_date ( '2007-12-20 18:31:34' , 'YYYY-MM-DD HH24:M ......
1.µÇ½ϵͳÓû§
sqlplus È»ºóÊäÈëϵͳÓû§ÃûºÍÃÜÂë
µÇ½±ðµÄÓû§
conn Óû§Ãû/ÃÜÂë;
2.´´½¨±í¿Õ¼ä
create tablespace ¿Õ¼äÃû
datafile 'c:\¿Õ¼äÃû' size 15M --±í¿Õ¼äµÄ´æ·Å·¾¶,³õʼֵΪ15M
autoExtend on next 10M --¿Õ¼äµÄ×Ô¶¯Ôö³¤µÄÖµÊÇ10M
permanent online; --ÓÀ¾ÃʹÓÃ
3.´´½¨Óû§
create user s ......