Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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·þÎñÆ÷ÉÏÃæ ......

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

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

oracle 9i ×î½ü·¢Ïֵǽ±¨´í - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡
  ORA-01034:ORACLE not available
  ORA-27101:shared memory realm does not exist
ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡

1. Oracle sid ÕýÈ ......

¹ØÓÚOracle´¥·¢Æ÷µÄÎÊÌâ - Oracle / »ù´¡ºÍ¹ÜÀí

Ö÷ÒªÏëʵÏÖ£ºÔÚÿÌìµÄ0µã֮ǰ×Ô¶¯½«Êý¾Ý²åÈëÊý¾Ý¿â£¬Ï£Íû´ó¼ÒÖ¸µã£¡
×Ô¶¯²åÈë?Êý¾ÝÔ´ÄÄÀïÀ´µÄ,²åÈ뵽ʲôµØ·½
´¥·¢Æ÷?
Ó¦¸ÃÓÃJOB

Êý¾ÝÔ´ÔÝʱÏëµÄÊǹ̶¨Êý¾Ý£¬²åÈëµ½Ò»Õűí

ÄǾÍÊÇÓÃJOB¶¨Ê±Ö´ÐÐ,´ÓÎļþµ¼ÈëÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ