How to create a datetime column with default value in sqlite3?

前端 未结 4 1128
甜味超标
甜味超标 2020-12-23 02:03

Is there a way to create a table in sqlite3 that has a datetime column that defaults to \'now\'?

The following statement returns a syntax error:

crea         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 02:35

    CURRENT_TIMESTAMP is a literal-value just like 'mystring'

    column-constraint:

    enter image description here

    literal-value:

    enter image description here

提交回复
热议问题