1

Does anyone know how to add a constraint to a column "ce_email" that I don't want to have commas or semicolons? I'm using MySQL.

Alfabravo
  • 7,493
  • 6
  • 46
  • 82
chase cabrera
  • 129
  • 11
  • http://stackoverflow.com/help/how-to-ask – MattAllegro Aug 23 '15 at 18:56
  • 3
    MySQL accepts the syntax for `check constraint`, but it doesn't actually do anything. So, if you want to do this you need to use a trigger. – Gordon Linoff Aug 23 '15 at 19:14
  • 1
    You could add a regex trigger. Check this question http://stackoverflow.com/questions/16005283/is-it-possible-to-enforce-data-checking-in-mysql-using-regular-expression – Majid Aug 23 '15 at 19:21

0 Answers0