How to remove the UNIQUE KEY attribute from a column in MySQL?

3

I created a table in MySQl that uses a column named loja_num with the unique key attribute

UNIQUE KEY loja_num (loja_num,

But now, I'd like to remove this attribute from this column. I've done some research without success. Does anyone know what command I use in MySQL?

I use XAMPP on Windows and the database is MySQL.

Thank you.

    
asked by anonymous 18.09.2016 / 02:46

1 answer

4

The @IgorSantana commented on the resolution as follows:

  • He researched the indexes that existed in the bank.

    SHOW INDEXES FROM lojas_info;
    
  • You deleted the index containing UNIQUE KEY :

    ALTER TABLE lojas_info DROP INDEX loja_num;
    
  • 20.09.2016 / 21:01