How can I check my database if the email is already registered to throw an error else proceed to insert to table the new account this is what i got
IF Not Exists(
SELECT EmailAddres FROM accountInfo WHERE accountInfo.EmailAddres = $3
)
BEGIN
INSERT INTO accountInfo (FirstName, LastName, EmailAddres,Password)
VALUES($1,$2,$3,$4)