Mega Code Archive

 
Categories / PostgreSQL / Constraints
 

Primary keys constrains more than one column

postgres=# postgres=# -- Primary keys constrains more than one column postgres=# postgres=# CREATE TABLE example ( postgres(#    a integer, postgres(#    b integer, postgres(#    c integer, postgres(#    PRIMARY KEY (a, c) postgres(# ); NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "example_pkey" for table "example" CREATE TABLE postgres=# postgres=# drop table example; DROP TABLE postgres=# postgres=#