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

ÔÚOracleÖÐÈçºÎÈ¥µôÕâÑùµÄÖØ¸´ÐÐ - Oracle / ¸ß¼¶¼¼Êõ

ÔÚOracleÖвéѯµÃµ½ÀàËÆÕâÑùµÄ½á¹û£º
a b ab
1 2 1,2
2 1 2,1
ÈçºÎÈ¥µôÆäÖÐÈÎÒâÒ»Ìõ¼Ç¼
select * from table1 t
where not exists(
  select 1 from table1 where a=t.b and b=t.a and a>t.a)

SQL code:
with temp as(
select 1 a,2 b,'1,2' ab from dual
union all
select 2 a,1 b,'2,1' ab from dual
)
select * from temp where a = (round(dbms_random.value)+1)


ÒýÓÃ
select * from table1 t
where not exists(
select 1 from table1 where a=t.b and b=t.a and a>t.a)

ÒýÓÃһϿñÀ˵쬏ÄÒ»ÏÂ:
delete from table1 t
where exists(
  select 1 from tmp where a=t.b and b=t.a and a<t.a)

and rownum=1 ¼Ó¸öÕâ¸ö
¾ÍÑ¡³öÒ»ÌõÁË,

ÒýÓÃ
ÔÚOracleÖвéѯµÃµ½ÀàËÆÕâÑùµÄ½á¹û£º
a b ab
1 2 1,2
2 1 2,1
ÈçºÎÈ¥µôÆäÖÐÈÎÒâÒ»Ìõ¼Ç¼


Â¥Ö÷µÄÃèÊö¸úÎÊÌâÑÏÖØ²»·ûºÏ°¡£¡

¸ù¾ÝÎÊÌâÃèÊö£¬È¥µôÈÎÒâÒ»Ðеϰ£¬delete from tb where rownum=1; ¾ÍºÃÁË¡£

ÖÁÓÚÖØ¸´ÐмǼȥµôµÄ£¬Òª¿´Óм¸¸ö×ֶΣ¬²ÅºÃдsqlÓï¾ä£¬¼ÓÈëÄã±ítb ÓÐidÖ÷¼ü¡¢c1¡¢c2¡¢c3¡£ÄÇÃ´ÖØ¸´µÄ¼Ç¼¾ÍÊÇc1¡¢c2¡¢c3×Ö¶ÎÖØ¸´°É¡£
ÄÇôɾ³ýÖØ¸´ÐеÄsql¾ÍÊÇ
delete from tb t2
where exists(select 1 from tb t1 where t1.c1=t2.c1 and t1.c2=t2.c2 and t1.c3=t2.c3 and t1.id<>t2


Ïà¹ØÎÊ´ð£º

OracleÀëÏß·ÃÎÊ---ÇóÖú - Oracle / »ù´¡ºÍ¹ÜÀí

´ó¼ÒºÃ,ÎÒÏÖÔÚ°Ñoracle·þÎñÆ÷ÉÏÃæµÄԭʼÎļþ,ÏÂÔØµ½±¾»úÁË.ÎÒÏëÔÚ±¾»ú·ÃÎÊÊý¾Ý¿âÔõôÉèÖð¡.ÊDz»ÊÇÀàËÆ¿ÉÒÔ½¨Á¢Ò»¸öʲôÐéÄâ·þÎñÆ÷À´ÊµÏÖ.Çë´ó¼Ò³ö³öÖ÷Òâ
ÒýÓÃ
    ´ó¼ÒºÃ,ÎÒÏÖÔÚ°Ñoracle·þÎñÆ÷ÉÏÃæ ......

Oracle Êý¾Ýµ¼³öÎÊÌâ - Oracle / ¸ß¼¶¼¼Êõ

exp user/password@dbname file=c:\table.dmp tables=jbitaku,jbitakum grants=y
È»áá°´»Ø車鍵 說Ã÷:¡¡ user/password@dbname ¡¡·Ö別±íʾÓÃ戶Ãû£¬ÃÜ碼ºÍ·þ務Ãû f ......

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

JavaÖ®¸¸À뿪Oracle£¬±¯Í´°¡£¡£¡ - Java / ·Ç¼¼ÊõÇø

¿´µ½ÓÐÒ»¸öSUNµÄÔªÀÏ´ÓOracle¹«Ë¾´ÇÖ°£¬¶øÇÒÊÇJava´´Ê¼ÈË——´óÃû¶¦¶¦µÄJames Gosling£¬
ÐÄÖÐÏ൱ÊÜ´ò»÷£¡ºÜ±¯Í´£¡
OrableÕâÊÇÔõôÁË£¬ÄѵÀÕâ¾ÍÊÇËùνµÄÈںϣ¨Ö«½â£¬·Ö»¯£¬Ïûʧ£©Âð£¿
SUNµÄÒ»°ïÀÏÔ±¹¤¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ