I want to insert values into a table but need to check if the value exist in the last row or not. I normally insert values like
INSERT INTO `table` (`column1`,`column2`,`column3`,`column4`) VALUES ('value1','value2','value3','value4')
But now I need to put a check, if the value1 exist in the last row of the table do not insert, insert otherwise.
For that I am trying to use
WHERE NOT EXISTS
I actually want to check the last row of the table if the value exist then it should not duplicate it.