SQLite 设置Datetime为默认时间

DATETIME DEFAULT (datetime(CURRENT_TIMESTAMP,'localtime')),


范例SQL语句为:

CREATE TABLE [TBL_TANK_ALARM] (
  [ALARM_ID] NUMBER(10),
  [TANK_NO] VARCHAR2(50) NOT NULL CONSTRAINT [ALARM_TANKNO] REFERENCES [TBL_TANK]([TANK_NO]) MATCH SIMPLE,
  [ALARM] VARCHAR2(255),
  [UPLOAD_TIME] DATETIME DEFAULT (datetime(CURRENT_TIMESTAMP,'localtime')),
  [IS_PROCESS] CHAR(1) DEFAULT ('0'),
  [PROCESS_USER] VARCHAR2(20),
  [PROCESS_TIME] DATE,
  [PROCESS_REMARK] VARCHAR2(255),
  [ALARM_LEVEL] VARCHAR2(20),
  [ALARM_VALUE] NUMBER(10,4));

你可能感兴趣的:(sql,sqlite)