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

oracle procedure ʵ¼Ê¿ª·¢Óöµ½µÄÎÊÌâ

ÓÐÁ½Õűí
1.µÚÒ»ÕÅ,ÊýÁ¿°ÙÍò¼¶
id  number Ö÷¼ü
name varchar(50)
2.µÚ¶þÕÅ,ÊýÁ¿1Íò¼¶
id number Ö÷¼ü
deletename varchar(50)


ÏÖÔÚµÄÎÊÌâÊÇҪдһ¸ö´æ´¢¹ý³Ì,ɾ³ýµÚÒ»ÕűíÖеÄname×Ö¶ÎÓÐÔÚµÚ¶þÕűídeletenameÖгöÏֵļǼ,
ÔõôдÐÔÄÜ×î¸ß°¡,´ó¼Ò¼¯Ë¼¹ãÒå°¡,СµÜÔÚ´Ëл¹ýÁË......
delete a
where exist
(
select 1
from b
where a.name=b.deletename

)

ÒýÓÃ
delete a
where exist
(
select 1
from b
where a.name=b.deletename

)

select 1 ÊÇʲôÒâ˼°¡

select 1
±íʾ³öÀ´µÄ½á¹ûÎÞËùνµÄ
Ö»ÓÐÆ¥ÅäÖµ¾Í·µ»Ø

Ö»ÊÇϰ¹ßд·¨£¬ÆäʵÄã¿ÉÒÔдÈκÎÖµ£¬²»Ó°Ïì½á¹ûµÄ

1.
delete a
where exist
(
select 1
from b
where a.name=b.deletename

)
2.
delete a
where a.name in 
(
select b.deletename
from b

ÕâÁ½¸ö,ÄĸöÐÔÄܸߵã


ÕâÖÖÊý¾ÝÁ¿EXISTÓ¦¸Ã»á¿ìµã


delete from a
where a.name in
(
select deletename
from a,b
where a.name=b.deletename
);


delete a
where exist
(
select 1
from b
where a.name=b.deletename

)
¿ìЩ

  ÔÚʵ¼ÊµÄÏîĿӦÓÃÖÐÓ¦¸Ã¾¡Á¿±ÜÃâʹÓà in ºÍ no


Ïà¹ØÎÊ´ð£º

php Öвéѯoracle date ÀàÐÍÊý¾ÝµÄÎÊÌâ?

ÈÕǰÓÃociº¯Êý²éѯoracleÊý¾Ýʱ³öÏÖ¸öÎÊÌ⣬¾ÍÊÇÔÚ²éѯµ½dateÀàÐ͵ÄÊý¾Ýʱ£¬Ê¹ÓÃpl/sql ²éѯoracle¿âÖеÄÊý¾ÝÏÔʾÊÇ
2009-9-29 12:12:12
µ«ÊÇͨ¹ýÓï¾äselect * from tablename ²éѯ£¬Ê¹ÓÃoci_fetch_array£¨£© ......

--oracle ´¥·¢Æ÷£¬×ª sqlserver ÎÊÌâ

--oracle ´¥·¢Æ÷£¬×ª sqlserver ÎÊÌâ
CREATE OR REPLACE TRIGGER TG_BU_TSTK_IMPORTITEM
BEFORE UPDATE ON TSTK_IMPORTITEM
FOR EACH ROW
DECLARE
VAR_LIBGOODCOUNT NUMERIC(12,2);
BEGIN ......

jdbc ´óÅúÁ¿¸üРoracleÊý¾Ý¿âÖеÄÊý¾Ý

ÎÒÓõÄÊÇPreparedStatementÀ´·¢ËÍÌá½»£¬²¢ÇÒÊý¾ÝÁ¿·Ç³£ÅÓ´ó¡£
Ò»´ÎÐèÒªÖ´ÐÐ8900¶àÌõ¸üÐÂÓï¾ä£¬Ò²¾ÍÊÇUpdateÓï¾ä¡£
ÎÒÊÔ¹ý·Ö¿ª£¬Ò»²¿·ÖÒ»²¿·ÖÀ´Ö´ÐÐÌá½»£¬µ«»¹ÊÇÒ»ÑùµÄËÙ¶ÈÂý£¬¶øÇÒÔ½Ö´ÐÐÔ½Âý¡£ÊµÔÚÊÇûÓÐʲô ......

Çë½ÌDRIVER={Microsoft ODBC for Oracle} Á¬½ÓÎÊÌ⣡

ÊÇÕâÑùµÄÎÒ×°ÁËһ̨2003µÄÐéÄâ»ú£¡

ÐéÄâ»úIP£º192.168.1.108
±¾»úIP£º192.168.1.100

ÎÒÔÚÐéÄâ»úÉÏ×°ÁËoracle 10G ,ÏÖÔÚÏë±àд¸ö³ÌÐò¶ÁÈ¡oracleÊý¾Ý¿âÀïµÄ¼Ç¼£¬

ÎÒÔÚ±¾»ú×°Á˸öoracle XE Cl ......

OracleÎÊ´ðÌâ,´ð¶ÔÓзÖ,²»¶ÔÓйÄÀø·Ö

ÂÒÂë²úÉúÊÇÓÉÓÚ¼¸¸ö×Ö·û¼¯Ö®¼äת»»²»Æ¥ÅäÔì³É£¬·ÖÒÔϼ¸ÖÖÇé¿ö£º£¨×¢£º×Ö·û¼¯Ö®¼äÈç¹û²»´æÔÚ×Ó¼¯¡¢³¬¼¯¶ÔÓ¦¹ØÏµÊ±µÄÇé¿ö²»Ó迼ÂÇ£¬ÒòΪÕâÖÖÇé¿öÏÂ×Ö·û¼¯Ö®¼äת»»±Ø²úÉúÂÒÂ룩

    1£©·þÎñÆ÷¶ËÊý¾Ý¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ