I have the following SQL query:
IF EXISTS(SELECT * FROM component_psar WHERE tbl_id = \'2\' AND row_nr = \'1\') UPDATE component_psar SET col_1 = \
Isn't this maybe the most elegant?
REPLACE INTO component_psar (tbl_id, row_nr, col_1, col_2, col_3, col_4, col_5, col_6, unit, add_info, fsar_lock) VALUES('2', '1', '1', '1', '1', '1', '1', '1', '1', '1', 'N')
see: http://dev.mysql.com/doc/refman/5.7/en/replace.html