Skip to main content

Create a unique constraint

MSSQL

To create a unique constraint on a table, use below query.
alter table <tableName> add constraint <constraintName> unique(<column>);

MySQL

 To create a unique constraint on a table, use below query.
alter table `<tableName>` add unique (column(s));

Comments

Popular posts from this blog