Sqlite using command line

前端 未结 6 1522
北恋
北恋 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 19:00

    Here are two answers for two questions:

    1. I find that using the sqlite3 command line client my arrow keys work without trouble.

    2. You have two errors in your INSERT statement:

      • You should not supply a value for the AUTOINCREMENT column.

      • You should list the columns and the order in which to map the values. This is required when you do not have the same amount of values as columns, but it's good practice even when you do, because later changes to the table's structure may change the order or number of columns.

      • Also, single quotes are more standard in SQL databases. SQLite will accept the double quotes, some other programs won't.

        INSERT INTO Resource (ResourceType) VALUES ('razor')

提交回复
热议问题