I came across the following SQL in a book:
CREATE TABLE \'categories\'( id SMALLINT NOT NULL AUTO INCREMENT, category VARCHAR(30) NOT NULL, PRIMARY KEY(\'id\
Similarity
Both a PRIMARY and UNIQUE index create a constraint that requires all values to be distinct (1).
PRIMARY
UNIQUE
Difference
The PRIMARY key (implicitly) defines all key columns as NOT NULL; additionally, a table can only have one primary key.
NOT NULL
(1) Each NULL value is considered to be distinct.
NULL