I am building the database at the moment fo a university project so am just dropping and recreating the whole database as it changes - that is why I am using create table.
I am currently creating the table as:
CREATE TABLE TOOL (toolNumber INT NOT NULL AUTO_INCREMENT, type BLOB, location VARCHAR(255), returnDate VARCHAR(30), PRIMARY KEY(toolNumber));
Now I want to change this so that the field type is unique.
The statments
CREATE TABLE test (blob_col BLOB, INDEX(blob_col(10)));
ALTER TABLE test
ADD UNIQUE(blob_col(10));
return the error:
ERROR 1061: Duplicate key name 'blob_col'