Skip to content

Instantly share code, notes, and snippets.

@sdoro
Created November 2, 2012 18:58
Show Gist options
  • Save sdoro/4003626 to your computer and use it in GitHub Desktop.
Save sdoro/4003626 to your computer and use it in GitHub Desktop.
PostgreSQL Auto Increment
CREATE SEQUENCE mgr_id_seq;
CREATE SEQUENCE;
CREATE TABLE managers(
mgr_id INTEGER PRIMARY KEY DEFAULT NEXTVAL('mgr_id_seq'),
mgr_name VARCHAR(50),
mgr_email VARCHAR(50)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment