Autoincrement id column in sqlite3 and postgresql

In postgresql it's: create table whatever(id serial primary key, ....).

And in sqlite3 it's: create table whatever(id integer primary key autoincrement, ....).

In sqlite3, autoincrement comes after primary key. In postgresql you use the serial type. (or bigserial). I always forget this.

sql sqlite postgresql

Edit on github
comments powered by Disqus
Click me