I am making an application which inserts users into a MySQL database.
I know you can make a column value unique, but I want a combination of 2 columns in a record to be unique.
For example:
id firstname lastname creationdate
-----------------------------------------
1 John Doe (today)
What I want to achieve is that I can enter a record like :
2, John, Deo, (today)
but I cannot enter:
2, John, Doe, (today)
What SQL statement can I use to make a combination of multiple columns unique?