create table pippo (
create unique index udxpippo on pippo (cdesc asc);
whith this rows inside:
insert into pippo values (1, 'Malattie oncologiche');
insert into pippo values (2, 'Malattie Oncologiche');
In Oracle v10 (Linux) I haven't problem to keep these rows because it's CASE SENSITIVE but when I try to migrate data to PIPPO in Mysql I've got this error:
ERROR 1062 (23000) at line 17197: Duplicate entry 'Malattie Oncologiche' for key 2
Can I turn CASE SENSITIVE on in Mysql v5 like Oracle?
The real question is why you are adding an index to a decription field and then trying to insert duplicate records in the first place.
Surely the constraint should be on the identifier field (idpippo)?
The scenario is more complicated than this example!
Sure the administration in this case isn't correct but these rows have some foreign keys so when I try to migrate from Oracle to MySql I would to have identical situation and without error! and I can't remove index!!
Ah, you didn't specify that you were migrating a DB from Oracle to MySQL.
What is your create table DDL for MySQL??? And thus what is your column collation for that particular column? Please post your create table statement for the table (it will be contained within your script.sql). You will need to alter the default collation for MySQL so that the tables are created to be case sensitive. Careful what you do with this though (i.e. you might want to change it back after your import).
create table pippo(
idpippo decimal(10) not null ,
cdesc varchar(50) default null,
...I want to thank you because now I know that I must specify the collation at the end of the creation table! (example latin1_general_cs cs -> case sensitive!!)