How to use ON DUPLICATE KEY in insert statement
Problem:
In case of inserting or updating record we use separate logic using if statement or case statement:
e.g.:
if(i==0)
insert here
if(i=1)
update here
we can terminate the above if statement by using On Duplicate Key.
by using this only one statement can be use for insert and update record.
*note: user_nm...