select to_date(to_number(to_char(sysdate,'yyyymmdd'))-1,'yyyy-mm-dd') from dual;oracle更新语句:update tablename a set name=(selete name from (select * from tablename where RandomId=0) b where to_number(substr(a.path,4,1))=b.id) where a.RandomId=1