If I add a UNIQUE index on the email,password columns, will the index check if:
- Is
emailuniqueANDispasswordunique, or - The combination of
email,passwordis unique, as in, it would allowu1@mail.com, 123andu2@mail.com, 123
Apologies if my thoughts seem abrupt here, I’m having difficulty in expressing them today for some reason. Thanks in advance!
Your second answer is the correct one. The combination of the two fields must be unique.
For #1 you would need a separate unique index on each column.