SQLite 设置Datetime为默认时间
DATETIMEDEFAULT(datetime(CURRENT_TIMESTAMP,'localtime')),
范例SQL语句为:
CREATETABLE[TBL_TANK_ALARM](
[ALARM_ID]NUMBER(10),
[TANK_NO]VARCHAR2(50)NOTNULLCONSTRAINT[ALARM_TANKNO]REFERENCES[TBL_TANK]([TANK_NO])MATCHSIMPLE,
[ALARM]VARCHAR2(255),
[UPLOAD_TIME]DATETIMEDEFAULT(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));
譬如:create table client (_id integer primary key autoincrement," +"客户名称 varchar(100) NOT NULL, 联系人 varchar(100)," +"联系电话 varchar(100), 邮箱 varchar(100), 地址 varchar(200),"+"传真 varchar(100), QQ varchar(100), 所在省份 varchar(200),"+"客户状态 varchar(100), 客户级别 varchar(100), 备注 varchar(1000),"+"录入时间 TIMESTAMP default (datetime('now', 'localtime')));"
相关推荐
Greatemperor 2020-07-19
yogoma 2020-06-25
meylovezn 2020-03-23
shenzhenzsw 2020-07-18
丽丽 2020-05-19
GechangLiu 2020-04-26
yangyutong00 2020-04-16
蜡笔小鑫爱看雪 2020-03-01
CloudXli 2020-02-21
leodengzx 2020-01-31
LczPtr 2019-12-28
83560193 2013-06-25
chouliqingke 2019-12-18
xiaoxiaoniaoer 2019-12-18
啦啦啦啦啦 2019-12-08
逍遥友 2019-12-04
84096424 2019-10-23