Sqlite using command line

前端 未结 6 1543
北恋
北恋 2021-01-01 18:18

Sqlite is kinda frustrating. Each time I run a command, I\'m not able to use the up down left right arrows to retrieve my previously typed commands. Is there any way to enab

6条回答
  •  被撕碎了的回忆
    2021-01-01 18:42

    First problem: Your insert statement contains 2 fields but your table has 3 fields, so it's ambiguous. SQLite can't determine which fields you want to set. The second problem is: don't set your resourceID to null if you want to use the autoincrement.

    Try this:

    insert into resource(resourceType) values ("razor");
    

    This will set the resourceID to the next value of the autoincrement and the userID to the default value.

提交回复
热议问题