SQLite时间插入查询

时间:2014-07-16 09:44:06

标签: sqlite

我想将时间值插入SQLite。我搜索了函数,修饰符,时间字符串但是我无法实现我的目标。当我写我的查询时,这不记录' .323',只记录' 08:25:01'。我想录制' 08:25:01.323'。我的疑问是:

insert into table_name (column_name) values (time('08:25:01.323'))

我在等你的帮助..

1 个答案:

答案 0 :(得分:0)

将时间存储为字符串,并在必要时进行解析。

sqlite> create table t (t text);
sqlite> insert into t values ('08:25:01.323');
sqlite> select * from t;
08:25:01.323
sqlite> select t, time(t) from t;
08:25:01.323|08:25:01