oracleµ¥Ðк¯Êý
µ¥Ðк¯Êý:
º¯ÊýÀà±ð:
µ¥ÐÐ:·µ»Øµ¥¸ö½á¹û:substr,length
¶àÐÐ:·µ»Ø¶à¸ö½á¹û,any,all
µ¥ÐеķÖÀà:
×Ö·ûÀ࣬ÈÕÆÚÀ࣬Êý×ÖÀ࣬ת»»À࣬ͨÓÃÀà
1.×Ö·ûÀà
ת»»´óСд:
lower:ת»»ÎªÐ¡Ð´
Select ENAME,LOWER(ENAME) from EMP
upper:ת»»Îª´óд
Select upper('abcd') from DUAL
initcap :Ê××Öĸ´óд
Select INITCAP(ENAME) from EMP
2.×Ö·û´¦ÀíÀà
concat:Á¬½ÓÁ½¸ö²»Í¬µÄÁÐ,CONCAtÖ»ÄܽÓÊÜÁ½¸ö²ÎÊý
Select CONCAT(EMPNO,ENAME) from EMP
Select CONCAT('A','B') from dual
substr:½ØÈ¡×Ó´®
ϱê´Ó1¿ªÊ¼
Select SUBSTR(ENAME,2) from EMP--´ÓµÚ2¸öλÖýص½Ä©Î²
Select SUBSTR(ENAME,2,3) from EMP--´ÓµÚ2¸öλÖýØÈ¡3¸ö
length:ÌáÈ¡³¤¶È
Select ENAME,length(ename) from emp
INSTR:Ï൱ÓÚStringÀàÖеÄindexOf,ÇóË÷Òý
Select ENAME,instr(ename,'A') from emp
LPADºÍRPADµÄÓ÷¨
±íʾ²¹³äµÄº¬Òå
Select LPAD(SAL,10,'*') from EMP
Select RPAD(SAL,10,'*') from EMP
½«salÏÔʾΪ10λ,²»×ãµÄλÖò¹ÉÏ×Ö·û*
trimÁ½±ßÂË¿Õ
Select Trim(' A B C ') from DUal
ʹÓÃLTrimeºÍRTrim¹ýÂËÒ»±ßµÄ¿Õ¸ñ
Select LTrim(' A B C ') from DUAL
REPLACE:Ìæ»»
Select ename ,Replace(ename,'A','B') from EMP
3.Êý×Öת»»Àà:
ROUND:ËÄÉáÎåÈë
TRUNC:½ØÈ¡
MOD:È¡Óà
Select ROUND(16.336666663,3) from DUAL
Select TRUNC(16.33666666,3) from DUAL
Select Mod(8,3) from DUAL
4.ÈÕÆÚÀຯÊý
sysdate:ÄêÔÂÈÕʱ·ÖÃë
ÈÕÆÚ+-1,¶¼´ú±íÒ»ÌìµÄʱ¼ä,±ÈÈç:
Select TRUNC(Sysdate-365) from DUAL
Select Sysdate-1/24/60 from DUAL
5.ÈÕÆÚÔËË㺯Êý
MONTHS_BETWEEN:±íʾÁ½¸öÈÕÆÚµÄÔ·ÝÖ®²î
Select EMPNO,HIREDATE,MONTHS_BETWEEN(Sysdate,HIREDATE)/12 from EMP
ADD_MONTHS:±íʾ¸øÖ¸¶¨µÄÈÕÆÚ¼ÓÒ»¸öÔÂÊý
Select HIREDATE,ADD_MONTHS(HIREDATE,3) from EMP
NEXT_DAY:±íʾÒÔµ±Ç°Ê±¼äΪ»ù×¼,ÏÂÒ»¸ö"Ä¿±êÈÕ"µÄÈÕÆÚ
Select NEXT_DAY(Sysdate,'ÐÇÆÚ¶þ') from DUAL
LAST_DAY:¼ÆË㵱ǰÈÕÆÚµÄ×îºóÒ»Ìì
Select HIREDATE,LAST_DAY(HIREDATE)-HIREDATE from EMP
ROUND:¶ÔÈÕÆÚ½øÐÐËÄÉáÎåÈë
Select ROUND(Sysdate,'YEAR') from DUAL
TRUNC:±íʾ¶ÔÈÕÆÚ½øÐнØÈ¡
Select TRUNC(Sysdate) from DUAL
Ïà¹ØÎĵµ£º
About parent vs child latches. There is no fundamental low level difference between parent and child latches, they are all small regions of memory modified with atomic test-and-set style opcodes.
You see parent (and solitary) latches from x$ksll ......
ת×Ô£ºhttp://blog.csdn.net/wangdongzjk/archive/2005/11/18/532424.aspx
ʹØCUBE ROLLUP GROUPING SETS£¨1£©
ÔÎÄÒý×Ô£º
¾ÛºÏÊÇÊý¾Ý²Ö¿âµÄ»ù´¡¡£ÎªÁËÌá¸ß¾ÛºÏµÄÐÔÄÜ¡£OracleÌṩÁËGroup By Ìõ¿îµÄÀ©Õ¹¡£
1£® CUBE, ROLLUPÀ©Õ¹
2£® 3¸ögroupingº¯Êý
......
Oracle ×°Åä¹£¸Å
Òª²é¿´¿ÉÓà RAM ºÍ»¥»»¿Õ¼ä´óС£¬ÔË×÷ÒÔ´ÎÏÂÁ
grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo
±ÈÈ磺
# grep MemTotal /proc/meminfo
MemTotal:512236 kB
# grep SwapTotal /proc/meminfo
SwapTotal:1574360 kB
½ÓÏÂÀ´£¬´´ÔìÓÃÀ´×°ÅäºÍά»¤ Oracle Ê®g Èí¼þµÄ Linux ×éºÍÓû ......
Step1. Insert empty_clob() into the Clob column of Oracle
Step2. Set autocommit to false
Step3. Select Clob as oracle.sql.CLOB from database
Step4. Insert String into Clob
Step5. Commit
Example:
import java.sql.*;
import java.io.*;
import oracle.jdbc.driver.OracleResultSet;
......
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO2','SCOTT') text from dual;
TEXT
----------------------------------------
CREATE OR REPLACE PROCEDURE "SCOTT"."P
RO2"
is
begin
dbms_output.put_line('wangpeng up');
end;
SQL> select dbms_metadata.get_ddl('PROCEDURE','PRO1','SCOTT') te ......