I need to update a table by some condition, not with primary key.
I am trying to do something like following
update p_price set price = :price where p_id = :pid and c_id = :cid if there is no any row with where p_id = :pid and c_id = :cid then insert into p_price (p_id, c_id, price) value (1,2,3)
is that possible with sql command?
note: there are no primary key so I can not use ON DUPLICATE KEY.