If you do it when creating a table you do it like this:
create table status (
id SMALLINT NOT NULL AUTO_INCREMENT,
name VARCHAR(255),
unique (name)
)
If you already have a table and want to set a column to unique you do the following:
ALTER TABLE status ADD UNIQUE (name)