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);
ÕâÖÖ¾ÍÊÇʹÓÃ×Ó²éѯÀ´È·¶¨¸üеÄÊý¾Ý¡£
Ïà¹ØÎĵµ£º
(1)SEQNAME.NEXTVALÀïÃæµÄÖµÈçºÎ¶Á³öÀ´£¿¿ÉÒÔÖ±½ÓÔÚinsert into test values(SEQNAME.NEXTVAL) ÊÇ¿ÉÒÔÓà ÕâÑù£º
SELECT tmp#_seq.NEXTVAL
INTO id_temp
from DUAL; È»ºó¿ÉÒ ......
---------Êýѧº¯Êý
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:select cast ......
package com.chinacache.boss.queryservice.service.impl;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import com.chinacache.boss.queryservice.excepti ......
TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02 13:45:25ΪÀý)
Year:
yy two digits Á½Î»Äê ......
Ò».B-TreeË÷Òý(b-tree index)
1. Ñ¡ÏîÔñË÷Òý×ֶεÄÔÔò:
ÔÚWHERE×Ó¾äÖÐ×îÆµ·±Ê¹ÓõÄ×Ö¶Î
Áª½ÓÓï¾äÖеÄÁª½Ó×Ö¶Î
Ñ¡Ôñ¸ßÑ¡ÔñÐÔµÄ×Ö¶Î(Èç¹ûºÜÉÙµÄ×Ö¶ÎÓµÓÐÏàֵͬ,¼´Óкܶà¶ÀÌØÖµ,ÔòÑ¡ÔñÐԺܺÃ)
ORACLEÔÚUNIQUEºÍÖ÷¼ü×Ö¶ÎÉÏ×Ô¶¯½¨Á¢Ë÷Òý
ÔÚÑ¡ÔñÐԺܲîµÄ×Ö¶ÎÉϽ¨Ë÷ÒýÖ»ÓÐÔÚÕâ¸ö×Ö¶ÎµÄ ......