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

oracle ÊÔͼÎÊÌ⣬Çë¸ßÊÖ°ï棬ÔÚÏßµÈ.....

ÎÊÌâÃèÊö£º
1¡¢¼ÙÉèÓбí
t1±í£¬°üº¬ËÄÁÐ
 s1 a b c
 1 a a a
 2 b b b 
.........

t2±í£¬°üº¬2ÁÐ
s2 ff
1 77
2 88
............

ÈçºÎÉú³ÉÕâÑùµÄºÏ²¢ÊÓͼ

s1 a b c ff
1 a a a  
2 b b b 
1 77
2 88

ÎÊÌâ2£º
¼ÙÉèÄÜÉú³ÉÉÏÊöÊÓͼ£¬ÏÖÔÚÒªÇëÇ󣬱êʶ³öÊý¾ÝÊÇÀ´Ô´
¼ÙÉèÀ´×Ôt1°×µÄÊý¾Ý±êʾ·ûΪxx,À´×Ôt2±íµÄÊý¾Ý±êʶΪyy
ÄÇô£¬ÈçºÎÉú³ÉÕâÑùµÄÊÓͼ£º
s1 a b c ff mm(ÐÂÁÐ)
1 a a a xx
2 b b b xx
1 77 yy
2 88 yy
ÒªÇóÊDz»ÄÜÐÞ¸Ät1,t2µÄ±í½á¹¹£¡£¡£¡£¡

·Ö²»¹»Ëµ£¬Áí¿ªÌù¼Ó


ʹÓÃunionºÍnullÔÚÎÊÌâ1ÖÐÊÔ¹ý£¬ÌáʾÁÐÖµ²»Æ¥Å䣡£¡


ÎÊÌâ2£º 
select s1, a, b, c,null ff,'XX' mm from t1 
union all 
select null s1, null a, null b,null c, ff,'YY' mm from t2;

¼¼ÊõÉϵ¹ÊDz»ÄÑÌ⣬ֻÊÇÕâ¸öÐèÇóÓеãÆæ¹Ö..
Â¥ÉϻشðÒѾ­²î²»¶àÁË¡£union allÏÂÃæµÄÁбðÃû¾Í²»ÓüÓÁË
select s1,a,b,c,null ff,'XX' mm from t1
union all
select s1,null,null,null,ff,'YY' from t2

´´½¨ÊÓͼ
create view VIEWNAME
as
select s1,a,b,c,null ff,'XX' mm from t1 
union all 
select s1,null,null,null,ff,'YY' from t2

¶¥Æð

ѧϰUnion AllÓï·¨ÁË¡£

ÎÒµÄÎÊÌâ1£¬¾ÍÊÇÓÃunion º


Ïà¹ØÎÊ´ð£º

½éÉÜOracleºÍmysqlµÄÊé - Oracle / ·Ç¼¼ÊõÇø

ÎÒ¶ÔSQL SERVERºÍACCESS±È½ÏÊ죬ËùÒÔÊý¾Ý¿âµÄͨÓûù´¡¶«Î÷¿ÉÒÔ˵¶¼ÕÆÎյIJ¶àÁË£¬ÎÒÏÖÔÚÏëÒªµÄ¾ÍÊÇÒÔÉÏÁ½Êý¾Ý¿âµÄ¶ÀÌØÖ®´¦µÄ½éÉܺÍÓ¦ÓýéÉÜ¡£
ÁíÍâÊé×îºÃ¶ÔÓ¦×îа汾 oracleÊÇ11g°É 10µÄÒ²ÐУ»mysqlÊÇ5.1°É
л ......

ÊÇoracleµÄbugô£¿É¢·ÖÁË£¡ - Oracle / »ù´¡ºÍ¹ÜÀí

±¾À´ÒªÐ´¸öupdateÓï¾ä
update table_a A
  set A.flag=1
  where A.id in (select B.id from table_b B)
½á¹ûÎóд³É
update table_a A
  set A.flag=1
  where ......

¹ØÓÚoracle 10gµÄsqlplus

ÏÖÔÚÎÒ±¾µØûÓа²×°oracle, µ«plsqldevÐèÒªsqlplus.exeµÈ£¬ÇëÎÊoracle10gÔÚwindowsÐèÒª
ÄÄЩexeÎļþ£¬ÄÄλ´ó¸çÄÜ˳±ãÌṩһÏÂQQ£º190565390

×°oracleµÄʱºò¿ÉÒÔÑ¡ÔñÖ»×°¿Í»§¶ËµÄ

×îÆðÂëҪװoracle£¬ÄãÖ»Ðè×°¿ ......

Ë­ÄÜÍƼö¼¸±¾oracleµÄÊé»òÊÓƵ - Oracle / ·Ç¼¼ÊõÇø

лл
ÎÒÒ²ÊÇÏëÖªµÀ

me too

ÎÒ Ò² Ïë Öª µÀ Æä Ëû µÄ£¬ÎÒ ÏÖ ÔÚ ¾Í ÔÚ Ñ§ orcale Êý ¾Ý ¿â£¬ÎÒ 
Óà µÄ ÊÇ ÕÔ Ôª ½Ü ±à µÄ.......

¸öÈ˾õµÃÔ­ÀíÐԵĶ«Î÷¿´Ò»Ð©¹Ù·½Îĵµ¿ÉÄÜ»áºÃһЩ Èç¹ûûÓÐÀÏʦ½Ì ......

oracleÊý¾Ý²éѯÎÊÌâ

ÓÐ500ÍòÌõͨ»°¼Ç¼
  ±àºÅ ºÅÂë ±»½ÐºÅÂë ¿ªÊ¼Ê±¼ä ½áÊøʱ¼ä ͨ»°Ê±³¤
  1 10010 20020 12:00 12:01 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ