Search Blog

Search duranek.blogspot.com

Friday, October 28, 2016

Confirm Uniqueness of Columns

To confirm uniqueness of column_A x column_B in a table, add unique constraint:
#alter table x add unique ( column_A,column_B )

To see the constraint do:
#show create table;

#desc table;
if you see MUL near a column, this means it is a part of a unique index. keywords: mysql unique constraint column

To remove it:

#show index from modulestepwriteaccess
#DROP index moduleId on modulestepwriteaccess

No comments: