mysql - How do I make 2 columns unique together? -


i have 2 columns:

  • confirmed_email
  • unconfirmed_email

i don't want them overlap. want:

  • confirmed_email unique
  • unconfirmed_email unique
  • confirmed_email + unconfirmed_email unique, if merged together. if "hello@gmail.com" exists in confirmed_email ,then cannot updated unconfirmed_email.

is there setting this?

i doubt want store 2 emails.

use 1 field , add bool field stores whether email confirmed.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -