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

ת:ORACLE ¶à±í¹ØÁª UPDATE Óï¾ä


ת:ORACLE
¶à±í¹ØÁª UPDATE Óï¾ä
Ô­Ìû£ºhttp://www.cnblogs.com/miley/archive/2010/04/15/1712617.html
  ΪÁË
·½±ãÆð¼û
,½¨Á¢ÁËÒÔϼòµ¥Ä£ÐÍ
,ºÍ¹¹ÔìÁ˲¿·Ö²âÊÔÊý¾Ý
:
   ÔÚij¸öÒµ
ÎñÊÜÀí×Óϵͳ
BSSÖУ¬
  --¿Í»§×Ê
Áϱí
  create table customers
   (
   customer_id   number(8)    not null,  -- ¿Í»§±êʾ
   city_name     varchar2(10) not null,  -- ËùÔÚ³ÇÊÐ
   customer_type char(2)      not null,  -- ¿Í»§ÀàÐÍ
 
   ...
   )
  create unique index PK_customers on customers
(customer_id)
   ÓÉÓÚijЩ
Ô­Òò£¬¿Í»§ËùÔÚ³ÇÊÐÕâ¸öÐÅÏ¢²¢²»Ê²Ã´×¼È·£¬µ«ÊÇÔÚ
   ¿Í»§·þÎñ
²¿µÄ
CRM×ÓϵͳÖУ¬Í¨¹ýÖ÷¶¯·þÎñ»ñÈ¡Á˲¿·Ö
¿Í»§
20%µÄËùÔÚ
   ³ÇÊеÈ×¼
È·ÐÅÏ¢£¬ÓÚÊÇÄ㽫¸Ã²¿·ÖÐÅÏ¢ÌáÈ¡ÖÁÒ»ÕÅÁÙʱ±íÖУº
  create table tmp_cust_city
   (
   customer_id     number(8) not null,
   citye_name     varchar2(10) not null£¬
   customer_type  char(2)   not null
  )
 
 
1) ×î¼òµ¥µÄ
ÐÎʽ
   --¾­È·
ÈÏ
customers±íÖÐËùÓÐ
customer_idСÓÚ
1000¾ùΪ
'±±¾©
'
   --1000ÒÔÄڵľùÊǹ«Ë¾×ßÏòÈ«¹ú֮ǰµÄ±¾³ÇÊеÄÀϿͻ§
:)
   update customers
   set    city_name='±±¾©
'
   where  customer_id<1000
 
2) Á½±í
(¶à±í
)¹ØÁª
update -- ½öÔÚ
where×Ö¾äÖеÄÁ¬½Ó
   --Õâ´Î
ÌáÈ¡µÄÊý¾Ý¶¼ÊÇ
VIP£¬ÇÒ°üÀ¨ÐÂÔöµÄ
,ËùÒÔ˳±ã¸üпͻ§Àà±ð
   update customers   a       -- ʹÓñðÃû
   set    customer_type='01' --01 Ϊ
vip£¬
00ΪÆÕͨ
   where  exists (select 1
                  from   tmp_cust_city b
  &


Ïà¹ØÎĵµ£º

Oracle 1z0 047 Exam


Exam Number/Code : 1z0-047
Exam Name : Oracle Database SQL Expert
Questions and Answers : 278 Q&As
Update Time: 2010-04-15
1. Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
A. The nested query executes after the outer query returns th ......

Oracle 1z0 047 Exam


Exam Number/Code : 1z0-047
Exam Name : Oracle Database SQL Expert
Questions and Answers : 278 Q&As
Update Time: 2010-04-15
1. Which two statements are true regarding the execution of the correlated subqueries? (Choose two.)
A. The nested query executes after the outer query returns th ......

oracle ²Ù×÷±íʾÀý

1.´´½¨±í£º
       a. ´´½¨xs±íÖмÆËã»úרҵѧÉúµÄ±¸·Ý
           Create table xs_jsj as select * from xs where zym=’¼ÆËã»ú’;
       b.ÍêÕûµÄÀý×Ó£º
¡¡¡¡¡¡¡¡¡¡ Create table test ......

oracleËéÆ¬Ð¡½á

author£ºskate
time£º2010-05-31
ÎÒÃÇÔÚʹÓÃwindowsµÄʱºò£¬¶¼ÖªµÀÒª¶¨ÆÚÕûÀí´ÅÅÌË鯬£¬ÒòΪ´ÅÅÌË鯬»áÓ°ÏìÐÔÄÜ£¬¸ø¹ÜÀíÉÏ´øÀ´¶îÍâµÄ
¸ºµ£¡£ÄÇoracle¸üÊÇÈç´Ë£¬µ±Ëæ×ÅÊý¾ÝÔö¼Ó£¬oracle´¦Àíº£Á¿Êý¾Ý±¾Éí¾ÍÒѾ­ºÜ·ÑÁ¦Á˰¡£¬Èç¹ûÔÙÓдóÁ¿
µÄË鯬£¬ÄǾÍÊÇÑ©ÉϼÓ˪°¡¡£ËùÒÔËéÆ¬ÒªÒýÆðdbaµÄ¸ß¶ÈÖØÊÓ£¬¾¡Ôç·¢ÏÖ¾¡Ôç´¦Àí¡£
莮 ......

oracle×Ö·û´®·Ö¸îºÍÌáÈ¡º¯Êý¶¨Òå


oracle×Ö·û´®·Ö¸îºÍÌáÈ¡
·Ö¸î
create or replace function Get_StrArrayLength
(
  av_str varchar2,  --Òª·Ö¸îµÄ×Ö·û´®
  av_split varchar2  --·Ö¸ô·ûºÅ
)
return number
is
  lv_str varchar2(1000);
  lv_length number;
begin
  lv_str:=ltrim(rtrim(av_str));
&nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ