oracle update from ÎÊÌ⣡
update t_tmprpt_firstreplycosttime t
set (t.firstreplytime,
t.dealstaff,
t.firstreplyfailcontent)
= (select a.suggesttime,
a.suggester,
substr(a.remark,instr(a.remark,'¡¿',1)+2)
from t_wf_suggesthis a
where t.serialno = a.serialno
and t.serviceclassid = a.serviceclassid);
Ïë°Ñt_tmprpt_firstreplycosttime ±íÖеÄ3¸ö×Ö¶ÎÊý¾Ý¸üÐÂΪt_wf_suggesthis±íÖеÄsuggesttime, suggester,substr(a.remark,instr(a.remark,'¡¿',1)+2)µÄÖµ¡£Ìõ¼þÊÇt±íµÄsreialnoºÍserviceclassid¶¼Óëa±íÖеÄÏàµÈ¡£
ÎÊÌ⣺µ±ÎÒÖ´ÐÐÕâÌõ¸üÐÂʱºò»á°Ñt±íÖеÄËùÓÐÊý¾Ý¶¼¸üÐÂÁË¡£
½â¾ö£ºoracleÖÐûupdate from ÕâÑùµÄ¸üУ¬¿ÉÒÔ¿¼ÂÇ2ÖÖ½â¾ö°ì·¨¡£
Ò»,
update (select a.suggesttime atime,
b.firstreplytime btime,
a.suggester astaff,
b.dealstaff bstaff,
substr(a.remark,instr(a.remark,'¡¿',1)+2) acontent,
b.firstreplyfailcontent bcontent
from t_wf_suggesthis a, t_tmprpt_firstreplycosttime b)
set btime = atime,
btaff = astaff,
bcontent = acontent;
ÕâÊÇÀàÊÓͼµÄ¸üз½·¨£¬ÕâÒ²ÊÇoracleËù¶ÀÓеġ£
ÏȰѶÔÓ¦µÄÊý¾ÝÈ«²¿³éÈ¡³öÀ´£¬È»ºó¸üбíÒ»Ñù¸üÐÂÊý¾Ý£¬ÕâÀïÐèҪעÒâµÄÊÇ£¬±ØÐë±£Ö¤±íµÄÊý¾ÝΨһÐÔ¡£
Õâ¾ÍÒªÇóa,bÁ½±íµÄ¹ØÁª×Ö¶ÎÉ϶¼ÊǾ߱¸Î¨Ò»ÐԵġ£
¶þ,
update t_tmprpt_firstreplycosttime t
set (t.firstreplytime,
t.dealstaff,
t.firstreplyfailcontent)
= (select a.suggesttime,
a.suggester,
substr(a.remark,instr(a.remark,'¡¿',1)+2)
from t_wf_suggesthis a
where t.serialno = a.serialno
and t.serviceclassid = a.serviceclassid)
where t.serialno in (select b.serialno
from t_wf_suggesthis b
where b.serialno = t.serialno
and b.serviceclassid = t.serviceclassid);
ÕâÖÖ¾ÍÊÇʹÓÃ×Ó²éѯÀ´È·¶¨¸üеÄÊý¾Ý¡£
Ïà¹ØÎĵµ£º
When queried, virtual columns appear to be normal table columns, but
their values are derived rather than being stored on disc. The syntax
for defining a virtual column is listed below.
column_name [datatype] [GENERATED ALWAYS] AS (expression) [VIRTUAL]
If the datatype is omitted, it is determin ......
(1)SEQNAME.NEXTVALÀïÃæµÄÖµÈçºÎ¶Á³öÀ´£¿¿ÉÒÔÖ±½ÓÔÚinsert into test values(SEQNAME.NEXTVAL) ÊÇ¿ÉÒÔÓà ÕâÑù£º
SELECT tmp#_seq.NEXTVAL
INTO id_temp
from DUAL; È»ºó¿ÉÒ ......
nvl( ) º¯Êý
ʾÀý Çë²ÎÔÄ
´ÓÁ½¸ö±í´ïʽ·µ»ØÒ»¸ö·Ç null Öµ¡£
Óï·¨
NVL(eExpression1, eExpression2)
²ÎÊý
eExpression1, eExpression2
Èç¹û eExpression1 µÄ¼ÆËã½á¹ûΪ null Öµ£¬Ôò NVL( ) ·µ»Ø eExpression2¡£Èç¹û eExpression1 µÄ¼ÆËã½á¹û²»ÊÇ null Öµ£¬Ôò·µ»Ø eExpression1¡£eExpression1 ºÍ eExpression2 ¿ÉÒÔ ......
TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02 13:45:25ΪÀý)
Year:
yy two digits Á½Î»Äê ......
Ò»¡¢UTL_INADDR°ü»ñÈ¡ipµØÖ·
½ñÌìÓÐÅóÓÑÔÚMSNÉÏÎÊÎÒÈçºÎ»ñµÃÒѾÁ¬½ÓÓû§µÄIPµØÖ·¡£
ÎÒÃÇÖªµÀ£¬Í¨¹ýSYS_CONTEXTº¯Êý¿ÉÒÔ»ñµÃÕⲿ·ÖÐÅÏ¢£¬µ±Ç°Óû§µÄipµÈÐÅÏ¢¿ÉÒÔͨ¹ýÈçÏÂÃüÁîÇáÒ×»ñÈ¡£º
SQL> select sys_context('userenv','host') from dual;
SYS_CONTEXT('USERENV','HOST')
------------------------------ ......