#mysql #uniqueconstraint
MySQL - phpMyAdmin 4.5.1 Add UNIQUE Constraint To Existing Column
Mysql statement Alter Table to adding a UNIQUE Constraint key to an existing column to avoid duplicate rows.To add a unique constraint to an existing column in MySQL(phpmyadmin) database, you can use an ALTER TABLE statement. This will ensure that no two rows in the table can have the same value in the specified column
steps to involve to add unique constraint
following the alter table statement
table_name: Replace this with the name of the existing table where you want to add the unique constraint.
constraint_name: Provide a name for the unique constraint. Choose a descriptive name that helps you identify the constraint later if needed.
column_name: Replace this with the name of the existing column to which you want to add the unique constraint.
Ещё видео!