格式时间:
select to_char(to_date('2022-03'|| '-01 08:00:00','YYYY-MM-DD HH24:MI:SS'),'YYYYMMDDHH24MISS') from dual;
select to_char(LAST_DAY(TO_DATE(('2022-03' || '-01 08:00:00'),'YYYY-MM-DD HH24:MI:SS')) + 1,'YYYYMMDDHH24MISS') from dual;
with as 用法
with a as
(select t.* from tab1 t where t.no = '01'),
b as
(select t.* from tab2 t where t.no = '4001'),
c as
(select t.* from tab3 t)
select a.*
from a a
left join b b
on a.id = b.id
left join c c
on a.id = c.id;
update
update table t
set t.字段= 'S'
where t.字段>= '2'
and t.字段<= '1'
and t.字段= '3';