MySQL Forums
Forum List  »  Newbie

Insert restriction
Posted by: Irfan Ali
Date: April 12, 2012 05:03AM

hi All,
I am trying to insert multiple records into mysql table , but i want to insert only unique values in all fields of the table, so their will not be any duplicate record in the table. but i can't maintain any primary key or unique in table structure.

CREATE TABLE `test`.`person_tbl` (
`first_name` char(20) DEFAULT NULL,
`last_name` char(20) DEFAULT NULL,

) ;

and i want to insert only unique records into the table

i used Insert IGNORE but it only works with Primary keys
so, if any body have any idea to resolve this situation please help me out
Thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
Insert restriction
April 12, 2012 05:03AM
April 12, 2012 05:06AM
April 12, 2012 06:25AM
April 12, 2012 08:30AM
April 12, 2012 06:48AM
April 12, 2012 06:56AM
April 12, 2012 07:02AM
April 12, 2012 11:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.