Hi Rob, i think to use REPLACE would do, if there is a unique index on myid:
REPACE mytable (myid, myname) VALUES (myid, mynewname); The Manual say in chapter 6.4.8: REPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record on a UNIQUE index or PRIMARY KEY, the old record is deleted before the new record is inserted. prosit Klaus -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]