MySQL - phpMyAdmin 4.5.1 Add UNIQUE Constraint To Existing Column

preview_player
Показать описание
#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.
Рекомендации по теме
Комментарии
Автор

ty so much sir aapne short video me bhut ache se shamjhaya

aarulsstylecorner
Автор

thank u so much sir u solved my problem

usama
Автор

but there is a problem when you enter the same email but in capital letters it's accepted!

sss-ksyk
Автор

I got blank fileds in database how to stop it ?

puneetsagar