On Saturday 16 March 2002 03:14 pm, you said: > Hi, > > Just set a unique index on the right column and you won't have anymore > duplicate in your table :) > > ALTER TABLE yourtable ADD UNIQUE(your_column); > > Regards, > You might also want to use "REPLACE INTO ..." rather than "INSERT INTO..." as the latter would give you a duplicate key error. The syntax for REPLACE is identical to INSERT, apart for the first word, of course... You can use UPDATE too...
sql, query -- Geoff Quelch Email: [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php