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

Á˽âoracle ÖеÄdual±í

Oracle»¹ÊDZȽϳ£Óõģ¬µ«ÓësqlserverÇø±ð»¹ÊÇͦ´óµÄ¡£Ñ§Ï°OracleµÃÁ˽âdual±í£¬ÕâÀïºÍ´ó¼Ò·ÖÏíһϣ¬Ï£Íû¶Ô´ó¼ÒÓÐÓÃ
1£º×ª×Ö·ûº¯Êý·Öת»»º¯ÊýºÍ×Ö·û²Ù×÷º¯Êý
ת»»º¯ÊýÓУºLower£¬upper£¬initcap£¨Ê××Öĸ´óд£©
×Ö·û²Ù×÷º¯Êý£ºconcat£¬substr£¬length£¬instr£¨Ä³¸ö×Ö·û´®ÔÚ´Ë×Ö·û´®ÖеÄλÖã©£¬ipad£¨×Ö·û´®°´Ä³ÖÖ¸ñʽÏÔʾ£©£»
ÀýÈ磺select initcap('as') from dual; ·µ»Ø½á¹ûΪAs //Ê××Öĸ´óд 
         select concat('aaa','bbb') from dual; // ·µ»Ø½á¹ûΪaaabbb ´ËÁÐÊÇÓÉ'aaa'ÁкÍ'bbb'ÁÐ×é³ÉµÄ¡£
        select initcap(substr('asdfas',1,3)) from dual; //·µ»Ø½á¹ûΪAsd //·µ»ØÒ»ÁУ¬´ËÁÐÊÇijÁеÄ×Ó´®
         select length('iloveyou') from dual; //·µ»Ø½á¹ûΪ8
         select length('¶«') from dual;//·µ»Ø½á¹ûΪ1
                                                    ˵Ã÷×ÖĸºÍºº×Ö¶¼ÊÇ°´Á½¸ö×Ö½ÚÀ´´æ´¢µÄ¡£
         select lpad('aaa',10,'b') from dual; //·µ»Ø½á¹ûΪ bbbbbbbaaa Èç¹û²»×ã10¸ö¾ÍÓÃbÏò×ó²¹Æë
        select rpad('aaa',10,'b') from dual; //·µ»Ø½á¹ûΪ aaabbbbbbb ÏòÓÒ
2£ºÔÚOracleÄÚ²¿´æ´¢¶¼ÊÇÒÔ´óд´æ´¢µÄ¡£
¡¡¡¡ÀýÈ磺
¡¡¡¡select * from emp where ename='king'; //²éÕÒ²»³ö½á¹û select * from emp where ename=upper('king'); //ÄܲéÕÒ³ö·ûºÏÌõ¼þµÄ½á¹û¡£
3£ºOracle Dual±í
¡¡¡¡Oracle Dual±í±È½ÏÌØÊ⣬ÊÇÒ»¸öϵͳ±í£¬Ö»ÓÐÒ»¸öDummy Varchar2(1)×ֶΣ¬¶øÇÒOracle»á¾¡Á¿±£Ö¤ËüÖ»·µ»ØÒ»Ìõ¼Ç¼¡£ÔÚ²éѯOracleÖеÄsysdate»òsequence.currvalµÈϵͳֵʱÐèÒªÔÚSelect Óï¾äÖÐдDual¡£È磺select sysdate from dual.ÓÃDual±íÀ´²éѯһЩûÓоßÌåÓû§±íµÄÊý¾Ý¡£
¡¡¡¡ÆäʵÔÚÿ¸ö±íÖж¼ÓÐÒ»¸öÒþ²ØµÄrowid£¬rownum(³ýÁËdual£¬ÆäËû±í¶¼ÓÐ) ¡£
¡¡¡¡dual²»½ö¿ÉÒÔ²


Ïà¹ØÎĵµ£º

¹ØÓÚOracleÔÚAIXƽ̨ʵʩµÄ ÅàѵÄÚÈÝ°²ÅÅ

¡¶oracle´óÐÍÊý¾Ý¿âϵͳÔÚAIX/unixÉϵÄʵսÏê½â¡·ÌÖÂÛ38    ¹ØÓÚOracleÔÚAIXÉÏʵʩÅàѵµÄÄÚÈÝ°²ÅÅ   Õâ¶Îʱ¼äÓÉÓÚһֱæÓÚÏîÄ¿£¬Ò²¾ÍÊèÓÚÔÚÈÕÖ¾ÉϺͶÁÕߵĻ¥¶¯£¬Òò´ËÓÖ»ýÔÜÏÂÈô¸É¶ÁÕßÀ´ÐÅδ»Ø£¬ÊµÔÚ±§Ç¸¡£ÆäÖÐÓм¸·âÊǹØÓÚOracleÔÚAIXÉÏʵʩÅàѵµÄ£¬ÒªÇóÎÒ¶ÔÅàѵÄÚÈݸøÓë½âÊͺÍ˵Ã÷¡£ÕâÀïÎÒ×öͳһ˵ ......

oracle sql tuning

alert index mem_ct monitoring usage;
desc v$object_usage;
set linesize 190
select * from v$object_usage;
SQL>SET AUTOTRACE ON;
¡¡¡¡*autotrace¹¦ÄÜÖ»ÄÜÔÚSQL*PLUSÀïʹÓÃ
¡¡¡¡ÆäËûһЩʹÓ÷½·¨£º
¡¡¡¡2.2.1¡¢ÔÚSQLPLUSÖеõ½Óï¾ä×ܵÄÖ´ÐÐʱ¼ä
¡¡¡¡SQL> set timing on;
2.2.2¡¢Ö»ÏÔʾִÐмƻ®--(»áÍ¬Ê ......

ÓÃPowerDesingner°ÑoracleÖÐµÄ±íµ¼³Éerͼ

ͨ¹ýwindowsÊý¾ÝÔ´¹ÜÀí£¬½¨Á¢ODBCÊý¾ÝÔ´¡£
ÎÒµÄÊÇ»ùÓÚoracle10g¡£
 
´ò¿ªWindowsµÄ¿ØÖÆÃæ°å
´ò¿ª¹ÜÀí¹¤¾ß
 
´ò¿ªÊý¾ÝÔ´(ODBC)
 
Ñ¡ÔñÄãÒª²Ù×÷µÄÊý¾Ý¿âÀàÐÍ
               1.ÎÒÑ¡ÔñµÄʱºò±¨Î´ÕÒµ½¿Í»§¶Ë×é¼þºÍһЩ¿Í»§ ......

oracle ѧϰ±Ê¼Ç1

½¨Á¢ÁÙʱ±í½á¹¹
create global temporary table myemp as select * from emp;
Ð޸ıí½á¹¹
alter table dept modify (Dname char(20));
alter table dept add (headcount number(3));
¸´ÖÆÒ»¸ö±í
create table emp3 as select * from emp;
²ÎÕÕij¸öÒÑ´æÔÚµÄ±í½¨Á¢Ò»¸ö±í½á¹¹£¬²»ÐèÒªÊý¾Ý
create table emp4 as selec ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ