MSSQL
To create a unique constraint on a table, use below query.
alter table <tableName> add constraint <constraintName> unique(<column>);
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));
alter table `<tableName>` add unique (column(s));
Comments
Post a Comment