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

ORACLE Êý¾Ý¿â¶ÔÏó

ORACLE Êý¾Ý¿â¶ÔÏó
——Ë÷Òý
 
q      Ë÷ÒýÊÇÓë±íÏà¹ØµÄÒ»¸ö¿ÉÑ¡½á¹¹
q      ÓÃÒÔÌá¸ß SQL Óï¾äÖ´ÐеÄÐÔÄÜ
q      ¼õÉÙ´ÅÅÌI/O
q      ʹÓà CREATE INDEX Óï¾ä´´½¨Ë÷Òý
q      ÔÚÂß¼­ÉϺÍÎïÀíÉ϶¼¶ÀÁ¢ÓÚ±íµÄÊý¾Ý
q      Oracle ×Ô¶¯Î¬»¤Ë÷Òý
 
Ë÷ÒýµÄÄ¿±ê£ºÌá¸ß²éѯÐÔÄÜ
 
Ë÷Òý¶ÔÔöɾ¸Ä²éµÄÓ°Ïì
SQLÓï¾ä
¶ÔÐÔÄܵÄÓ°Ïì
SELECT
²éѯÐÔÄÜÌá¸ß
UPDATE
¸üÐÂɾ³ýʱÐèÒªÏȲéѯ£¬´Ó´Ë½Ç¶ÈÐÔÄÜÌá¸ß
¸üÐÂɾ³ýʱÒýÆðË÷ÒýÐ޸ģ¬´Ó´Ë½Ç¶ÈÐÔÄÜϽµ
DELETE
INSERT
Ôö¼ÓÒýÆðË÷Òý¸Ä±ä£¬Ë÷Òý¶ÔÆ为ÃæÓ°Ïì¸ü´ó£¬ÐÔÄÜϽµ
 
ʲôʱºò½¨Á¢Ë÷Òý£¿
1.         ÐèҪƵ·±²éѯµÄÊý¾Ý
2.         Êý¾ÝÁ¿½Ï¶à
3.         ¸ÃÁв»»áƵ·± update/insert/delete
4.         ÔÚ where/order by/group by ×Ö¾äÖгöÏÖµÄÁÐ
5.         Ôڸ߻ùÊýÁÐÉϽ¨Á¢Ë÷Òý£¨Öظ´Êý¾Ý²»¶à£©
empno
ename
sal
1
HUANGPei
1000
1
HUANGPei
1000
3
HUANGPei
1000
4
HUANGPei
1000
 
empno
ename
sal
1
HUANGPei
1000
1
HUANGPei
1000
1
HUANGPei
1000
1
HUANGPei
1000
»ùÊý£º3/4
»ùÊý£º1/4
 
Ë÷ÒýµÄÀàÐÍ
ΨһË÷Òý
λͼË÷Òý
×éºÏË÷Òý
»ùÓÚº¯ÊýµÄË÷Òý
·´Ïò¼üË÷Òý
´´½¨±ê×¼Ë÷Òý
 
CREATE INDEX item_index ON itemfile (itemcode)
     TABLESPACE index_tbs;
 
Öؽ¨Ë÷Òý
 
ALTER INDEX item_index REBUILD;
 
ɾ³ýË÷Òý
 
DROP INDEX item_index;
 
ΨһË÷Òý
 
q      ΨһË÷ÒýÈ·±£ÔÚ¶¨ÒåË÷ÒýµÄÁÐÖÐûÓÐÖظ´Öµ
q      Oracle ×Ô¶¯ÔÚ±íµÄÖ÷¼üÁÐÉÏ´´½¨Î¨Ò»Ë÷Òý
q      ʹÓÃCREATE UNIQUE INDEXÓï¾ä´´½¨Î¨Ò»Ë÷Òý
CREATE UNIQUE INDEX item_index
     ON itemfile (itemcode);
 
×éºÏË÷Òý
 
q     


Ïà¹ØÎĵµ£º

OracleÊý¾Ýµ¼Èëµ¼³öimp/exp

¹¦ÄÜ£ºOracleÊý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓëoracleÊý¾Ý»¹Ô­Ó뱸·Ý¡£´ó¶àÇé¿ö¶¼¿ÉÒÔÓÃOracleÊý¾Ýµ¼Èëµ¼³öÍê³ÉÊý¾ÝµÄ±¸·ÝºÍ»¹Ô­£¨²»»áÔì³ÉÊý¾ÝµÄ¶ªÊ§£©¡£
¡¡¡¡OracleÓиöºÃ´¦£¬ËäÈ»ÄãµÄµçÄÔ²»ÊÇ·þÎñÆ÷£¬µ«ÊÇÄã×°ÁËoracle¿Í»§¶Ë£¬²¢½¨Á¢ÁËÁ¬½Ó £¨Í¨¹ýnet8 assistantÖб¾µØ——>·þÎñÃüÃû Ìí¼ÓÕýÈ·µÄ·þÎñÃüÃû
¡¡¡¡Æ ......

Oracle:PL/SQL ÖÐÈçºÎʹÓÃArray

http://tech.163.com/05/0701/10/1NIODMQS00091589.html
ÒòΪÔÚPL/SQL Öв¢Ã»ÓÐÊý×é.
ÕâÊÇż²é×ÊÁÏÕҵķ¶ÀýºÍ×Ô¼ºÐ´µÄ·¶ÀýÀ´½âÊÍÈçºÎÔÚPL/SQL ÖÐʹÓÃÊý×é. Ò²ÐíºÜ¶àÈËÒÑÖªµÀ, ²»¹ý¾ÍÊÇÈò»ÖªµÀµÄÅóÓÑÃÇÁ˽âһϰɡ£
----------------------
µ¥Î¬Êý×é
------------------------
DECLARE
TYPE
emp_ssn_array IS TA ......

Oracle Sql¼¼ÇÉ Upsert, Multitable Insert, Undrop

UpSert¹¦ÄÜ£º
MERGE <hint> INTO <table_name>
USING <table_view_or_query>
ON (<condition>)
WHEN MATCHED THEN <update_clause>
WHEN NOT MATCHED THEN <insert_clause>;
MultiTable Inserts¹¦ÄÜ£º
Multitable inserts allow a single INSERT INTO .. SELECT statement to ......

OracleÊý¾Ý¿â±¸·Ý·½Ê½

×Ô¼ºÕûÀíÁËÏÂOracleµÄÊý¾Ý¿â±¸·Ý·½°¸,ÓùýÀ䱸·Ý¡£ÆäËûûÓвâÊÔ¹ý
Ò»¡¢ µ¼³ö/µ¼Èë(Export/Import)
¡¡¡¡ÀûÓÃExport¿É½«Êý¾Ý´ÓÊý¾Ý¿â
ÖÐÌáÈ¡³öÀ´£¬ÀûÓÃImportÔò¿É½«ÌáÈ¡³öÀ´µÄÊý¾ÝËͻص½Oracle
Êý¾Ý¿âÖÐÈ¥¡£
¡¡¡¡1¡¢ ¼òµ¥µ¼³öÊý¾Ý(Export)ºÍµ¼ÈëÊý¾Ý(Import):
¡¡¡¡OracleÖ§³ÖÈýÖÖ·½Ê½ÀàÐ͵ÄÊä³ö£º
¡¡¡¡(1)¡¢±í·½Ê½(T·½ ......

ORACLE directory Ŀ¼


Create directoryÈÃÎÒÃÇ¿ÉÒÔÔÚOracleÊý¾Ý¿âÖÐÁé»îµÄ¶ÔÎļþ½øÐжÁд²Ù×÷£¬¼«´óµÄÌá¸ßÁËOracleµÄÒ×ÓÃÐԺͿÉÀ©Õ¹ÐÔ¡£
ÆäÓ﷨Ϊ:
CREATE [OR REPLACE] DIRECTORY directory AS 'pathname';
±¾°¸Àý¾ßÌå´´½¨ÈçÏÂ:
create or replace directory exp_dir as '/tmp';
Ŀ¼´´½¨ÒԺ󣬾ͿÉÒ԰ѶÁдȨÏÞÊÚÓèÌض¨Óû§ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ