The SQLite manager from FireFox when adding fields to the table automatically creates a field with rowid which in my case is completely unnecessary

    1 answer 1

    Surprised, but it is written in the documentation for SQLite : you need to specify in CREATE TABLE ...

     CREATE TABLE IF NOT EXISTS wordcount( word TEXT PRIMARY KEY, cnt INTEGER ) WITHOUT ROWID; --^^^^^^^ ^^^^^ вот это 

    This has a lot of pros and cons, which are painted in the same place. The most important:

    • In a table without rowid must be a primary key .
    • AUTOINCREMENT will not work .
    • sqlite3_update_hook() will not work on tables without rowid .
    • The table will be arranged easier , since it will not have a mandatory index with a rowid , some types of search will be faster.