INSERT IGNORE for duplicate entry not working
Posted: Thu May 21, 2009 3:36 pm
Dear All,
I tried running this code via the SQL query field in PHPMyAdmin:
INSERT IGNORE INTO `Table` (FName) VALUE ('Dave')
Table name='Table'
Column name='FName'
I read that this code suppose was suppose to prevent entering duplicate entries. But after entering 'Dave' in the FName column I still ended up with duplicates after executing this command. The name 'Dave' continue to be added everytime this command is executed.
Can you guys advise me if I am doing anything wrong. You can test it yourself and see if you are succeeding in preventing duplicate entries.
Looking forward to your responses.
Thanks
Dave
I tried running this code via the SQL query field in PHPMyAdmin:
INSERT IGNORE INTO `Table` (FName) VALUE ('Dave')
Table name='Table'
Column name='FName'
I read that this code suppose was suppose to prevent entering duplicate entries. But after entering 'Dave' in the FName column I still ended up with duplicates after executing this command. The name 'Dave' continue to be added everytime this command is executed.
Can you guys advise me if I am doing anything wrong. You can test it yourself and see if you are succeeding in preventing duplicate entries.
Looking forward to your responses.
Thanks
Dave