今天开发问我:
为什么编译过不去,一看就知道是缺少引号,应该改成
set serveroutput on
declare
abc VARCHAR2(2000);
begin
TIME_D := 'select (sysdate - 8 / 24 - to_date('||CHR(39)||'1970-01-01'||CHR(39)||', '||CHR(39)||'yyyy-mm-dd'||CHR(39)||')) * 86400000 from dual';
dbms_output.put_line(abc);
end;
原来语句格式:
CREATE OR REPLACE TRIGGER tttest
after INSERT
ON test
REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
DECLARE
TIME_D varchar2(30);
BEGIN
TIME_D := select (sysdate - 8 / 24 - to_date('1970-01-01', 'yyyy-mm-dd')) * 86400000 from dual;
END ;
阅读(1438) | 评论(0) | 转发(0) |