Hi
How can define a combination of rows as unique?
I'm using mysql and need to prevent duplicate row inserting. I don't want to define one column as unique but a combination of 3 columns.
How can I do that?
thanks
ALTER TABLE `table` ADD UNIQUE ( `field1` , `field2` , .... `fieldn` )
Don't forget to mark this thread resolved.
Hi,
I got this error massage:
Duplicate entry '135' for key 1 SQL= INSERT INTO mos_comprofiler ( id,user_id,approved… VALUES ( '135','135','1','1','… It’s ok with me if ‘id’=’id_user’, How can I remove this “no-duplicate” constrict ion?
id
user_id
approved
Thanks.