I have two tables user & user_tmp having primary key as id only. The fields of both the tables are likely as :
`id` PRIMARY AUTO_INCREMENT INT,
`Name` VARCHAR(80),
`Contact No` VARCHAR(10),
`Status` INT
I need a simple query based on IF EXISTS ON user_tmp table THEN update value in user ELSE insert in user table.
I tried with REPLACE & ON DUPLICATE KEY, but it din't work as id is the PRIMARY KEY and the value varies in both the tables.
Regards.