0

MySql Query to remove unique or primary key from table

This Is a Quick Tutorial to Remove Unique or Primary Key From MySql Table.Sometime we add unique key on table column to prevent duplicate entries but  a point you need some duplicate data in your column and that time you have to remove that unique key.For Example in a table name companies i have created a unique key as company_name  to prevent duplicate companies name in this column but there was some different address for some companies name so then i have to remove unique key from companies table.Then I Used Below Query to alter company_name column.Using MySql ALTER command you can change table column property.

drop unique constraint mysql, drop unique key in mysql, drop unique key php, mysql add unique key, mysql alter unique key, mysql cannot drop index, mysql drop unique key if existsX remove unique constraint sql

Removing unique key..

Removing primary key..

Leave a Reply

Your email address will not be published. Required fields are marked *