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

Oracle union intersect minus ¸´Ï°

Á½¸ö×Ó²éѯ½øÐм¯ºÏÔËÐУ¬ Ìõ¼þ¾ÍÊÇÁ½¸ö²éѯµÄ×ֶθöÊýÒ»Ö£¬ÀàÐÍÒ»Ö£¬×Ö¶ÎÃû¿ÉÒÔ²»Í¬¡£
SQL> select * from ta;
        ID NAME
---------- --------------------
         1 gorey
         2 gorey2
SQL> select * from tb;
        ID ADDRESS
---------- --------------------
         2 g2
         3 g3
         2 gorey2
SQL> select * from ta union select * from tb;
        ID NAME
---------- --------------------
         1 gorey
         2 g2
         2 gorey2
         3 g3
¡öunionС½á£º ×󼯺ϣ«ÓÒ¼¯ºÏ£¬¡¡µ«ÊÇÓÐÖظ´ÐеÄÇé¿öÖ»ÏÔʾһÐС£Ï൱ÓÚÓУģɣӣԣɣΣãÔ
SQL> select * from ta intersect select * from tb;
        ID NAME
---------- --------------------
         2 gorey2
¡öintersect С½á£º ûÓж໰£¬È¡½»¼¯
SQL> select * from ta minus select * from tb;
        ID NAME
---------- --------------------
         1 gorey
¡öminus С½á: ×󼯡¡£­¡¡×óÓÒ¼¯µÄ½»¼¯¡£
SQL> select * from ta union all select * from tb;
        ID NAME
---------- --------------------
         1 gorey
         2 gorey2
         2 g2
         3 g3
         2 gorey2
¡öunion all С½á: ×¢Ò⣬Õâ¸öºÍunion ²»Í¬£¬¡¡all¼ÓÉϵĻ°£¬Òâ


Ïà¹ØÎĵµ£º

win 7Ï°²×°oracle 10g£¨Ïêϸ¹ý³Ì£©

»ù±¾ÒªÇó
win 7µÄ°æ±¾ÊÇÆì½¢°æ£¬oracle 10g£¨Oracle10gµÚ2°æ10.2.0.3-10.2.0.410203vistaw2k8x86productiondb£©Ñ¸À×ÓÐÏÂÔØ
£¨ËÑË÷“oracle 10g vista”£¬760MB£©
¾ßÌå¹ý³Ì
1.ÅäÖÃÒ»¸öÐéÄâµÄIP£ºÔÚ°²×°ORACLE 10gǰϵͳ»á¼ì²â°²×°µÄһЩǰÌáÌõ¼þÊÇ·ñÂú×㣬
ÍùÍù»áÌáʾ˵£º½«Microsoft LoopBack AdapterÅäÖÃΪ ......

ORACLE ÎﻯÊÓͼ—OracleµÄÎﻯÊÓͼ

http://blog.csdn.net/XIAOHUI_LIAO/archive/2007/08/27/1759990.aspx
 create materialized view [view_name]
refresh [fast|complete|force]
[
on [commit|demand] |
start with (start_time) next (next_time)
]
as
{´´½¨ÎﻯÊÓͼÓõIJéѯÓï¾ä}
ÒÔÉÏÊÇ ......

ORACLEÎﻯÊÓͼ ¶¨Î»µ¼ÖÂÎﻯÊÓͼÎÞ·¨¿ìËÙˢеÄÔ­Òò


ÎﻯÊÓͼµÄ¿ìËÙˢвÉÓÃÁËÔöÁ¿µÄ»úÖÆ£¬ÔÚË¢ÐÂʱ£¬Ö»Õë¶Ô»ù±íÉÏ·¢Éú±ä»¯µÄÊý¾Ý½øÐÐˢС£Òò´Ë¿ìËÙË¢ÐÂÊÇÎﻯÊÓͼˢз½Ê½µÄÊ×Ñ¡¡£
µ«ÊÇ¿ìËÙˢоßÓн϶àµÄÔ¼Êø£¬¶øÇÒ¶ÔÓÚ²ÉÓÃON COMMITģʽ½øÐпìËÙˢеÄÎﻯÊÓͼ¸üÊÇÈç´Ë¡£¶ÔÓÚ°üº¬¾Û¼¯ºÍ°üº¬Á¬½ÓµÄÎﻯÊÓͼµÄ¿ìËÙˢлúÖƲ¢²»Ïàͬ£¬¶øÇÒ¶ÔÓÚ¶à²ãǶÌ×µÄÎﻯÊÓͼµÄ¿ìËÙˢР......

OracleÊý¾ÝÎļþǨÒÆÖª¶àÉÙ£¿

±¾ÈËÒÔÇ°ÕûÀíµÄÊý¾Ý¿âÎļþǨÒƹý³Ì£¬Ï£ÍûÄܹ»¶Ô´ó¼ÒÓÐËù°ïÖú
1¡¢sqlplus "sys/sys@·þÎñÃû as sysdba"
 
2¡¢Ð޸ĿØÖÆÎļþ:
 
    alter system set control_files='E:\oracle\oradata\myOracle_1\control01.ctl',
 'E:\oracle\oradata\myOracle_1\control02.ctl','E:\oracle\oradata\my ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ