mysql/oracle 小技巧自动插入当前时间

CREATE TABLE mkyongjava.TFA_ACTION_RELATION ( 

    FILE_ID          		bigint NOT NULL,

    AC_RULE_NAME         	VARCHAR(255) NOT NULL,

    ORIG_ACTION_FP0       	bigint NOT NULL,

    ORIG_ACTION_FP1       	bigint NOT NULL,

    CORR_ACTION_FP0       	bigint NOT NULL,

    CORR_ACTION_FP1       	bigint NOT NULL,

    INSERT_TIME          	TIMESTAMP DEFAULT NOW(),

    FM_LEVEL             	bigint NULL,

    RELATION_TYPE        	bigint NULL,

    ORG_ACTION_EVENT_TIME 	datetime NULL,

    CORR_ACTION_EVENT_TIME	datetime NULL 

)

  

mysql语法

 INSERT_TIME          	TIMESTAMP DEFAULT NOW() 
Oracle语法
INSERT_DB_TIME          DATE default sysdate

你可能感兴趣的:(oracle)