Primary Key
CREATE TABLE with PRIMARY CONSTRAINT
CREATE TABLE table_name ( column1 datatype, column2 datatype, ... columnN datatype, PRIMARY KEY(column1) );
Adding PRIMARY KEY to an existing column
ALTER TABLE table_name ADD PRIMARY KEY(column_name);
You can also name your constraint while defining them. Using this method you can add it to multiple columns.
ALTER TABLE table_name ADD CONSTRAINT pk PRIMARY KEY(column_name);
DROPPING PRIMARY KEY
ALTER TABLE table_name DROP PRIMARY KEY;
You can drop named primary key using following syntax:
ALTER TABLE table_name DROP CONSTRAINT pk;