I want to add a row to a database table, but if a row exists with the same unique key I want to update the row.
For example:
Check out REPLACE
http://dev.mysql.com/doc/refman/5.0/en/replace.html
REPLACE into table (id, name, age) values(1, "A", 19)