The column name is unique ( UNIQUE KEY ColumnName ).
I just want to make the column not unique (it should be very simple, but not understand how).
If in phpMyAdmin check the column name and click on the Unique icon below, get #1062 - Duplicate entry '' for key 'RegistrationNumber' . OK, see. This is because by clicking on the ADD UNIQUE icon.
There is a unique icon in the structure inside the line. But the icon is not clickable.
Like in phpMyAdmin, he did not find how to do this while trying to execute the request.
Based on the tips, tried ALTER TABLE TableName DROP INDEX ColumnName .
Get 1091 Can't DROP 'ColumnName'; check that column/key exists 1091 Can't DROP 'ColumnName'; check that column/key exists
Here https://stackoverflow.com/questions/548388/ ... found This error means that you are trying to delete a key which is being used by another table. Perhaps the column name is used by another table.
Please advise what needs to be done so that the column is not unique.
With SHOW CREATE TABLE get
Array ( [0] => Array ( [Table] => 18_6_TransactionPartners [Create Table] => CREATE TABLE `18_6_TransactionPartners` ( `Number` int(11) NOT NULL AUTO_INCREMENT, `CompanyName` char(255) COLLATE utf8_unicode_ci NOT NULL, `RegistrationNumber` char(255) COLLATE utf8_unicode_ci NOT NULL, ....... PRIMARY KEY (`Number`), UNIQUE KEY `Number_2` (`Number`), UNIQUE KEY `CompanyName` (`CompanyName`,`RegistrationNumber`), KEY `Number` (`Number`) ) ENGINE=InnoDB AUTO_INCREMENT=444 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ) )
Update
Based on the advice of @Bart Friederichs, I tried ALTER TABLE 18_6_TransactionPartners DROP INDEX Number , and the modified RegistrationNumber column was not unique. I donβt understand why (maybe there was a mess with unique keys). In any case, this may not be unique.