Skip to content

Commit a5d4ed9

Browse files
Remove unnecessary AUTOINCREMENT from example (#1891)
Firstly, thanks for the great project. According to (the sqlite documentation)[https://www.sqlite.org/autoinc.html], the `AUTOINCREMENT` keyword shouldn't be used in normal cases: > The AUTOINCREMENT keyword imposes extra CPU, memory, disk space, and disk I/O overhead and should be avoided if not strictly needed. *It is usually not needed*. > On an INSERT, if the ROWID or INTEGER PRIMARY KEY column is not explicitly given a value, then it will be filled automatically with an unused integer, usually one more than the largest ROWID currently in use. *This is true regardless of whether or not the AUTOINCREMENT keyword is used*.
1 parent a2ce8b6 commit a5d4ed9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/tutorials/getting-started-sqlite.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ create a file named `schema.sql` with the following contents:
3232

3333
```sql
3434
CREATE TABLE authors (
35-
id INTEGER PRIMARY KEY AUTOINCREMENT,
35+
id INTEGER PRIMARY KEY,
3636
name text NOT NULL,
3737
bio text
3838
);

0 commit comments

Comments
 (0)