I want that when you try to do an INSERT, but the value of a specific variable is already registered, it shows an error.
For example: | user | e-mail | | -------- | -------------- | | Joseph | [email protected] | | Rex | [email protected] |
If I enter this code it should show an error because the value is already assigned to a user.
INSERT INTO `users` (`usuario`, `email`) VALUES ("Eduardo", "[email protected]");
I hope I explained myself well, I'm new and this would help me a lot.