modified_at timestamp

回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

modified_at timestamp

文章 yehlu »

alter table INVMAST add (modified_at timestamp);
create trigger INVMAST_update_modified
before update on INVMAST
for each row
begin
:new.modified_at := sysdate;
end;
drop trigger INVMAST_update_modified

select INVMAST_NAME from INVMAST where INVMAST_NUMBER2 = '4717869053141';
update INVMAST set INVMAST_NAME = '超大萬用卡-彩繪生活/弘一*45' where INVMAST_NUMBER2 = '4717869053141';
select INVMAST_NUMBER2 from INVMAST WHERE modified_at >= to_date('10-02-2014 16:04:00', 'dd-mm-yyyy hh24:mi:ss')
select INVMAST_NUMBER2,modified_at from INVMAST WHERE modified_at >= to_date('2014-02-10 16:04:00', 'yyyy-mm-dd hh24:mi:ss')
select INVMAST_NUMBER2,to_char(modified_at,'yyyy-mm-dd hh24:mi:ss') from INVMAST WHERE to_char(modified_at,'yyyy-mm-dd hh24:mi:ss') >= '2014-02-11 00:00:00';
drop trigger INVMAST_update_modified
回覆文章

回到「ORACLE」