From Wiki

Mysql: InsertInto

INSERT INTO ... ON DUPLICATE KEY

INSERT INTO tablo (ad,soyad,email,firma) 
 VALUES ('Adim', 'Soyadim', '[email protected]','Firmam')
 ON DUPLICATE KEY UPDATE ad='Adim', soyad='Soyadim', firma='Firmam';

Retrieved from http://kozgun.net/wiki/pmwiki.php?n=Mysql.InsertInto
Page last modified on April 20, 2006, at 04:29 PM