What is "check expression" (mysql -> table properties -> columns -> details -> check expression)? What should I use?

Henrique Cunha Moreira de Abre 9 years ago updated by Rafał Strzaliński (Senior Engineer) 9 years ago 1
What data should I put inside the field "check expression"?
mysql -> table properties -> columns -> details -> check expression

This is a place where you can put an expression (predicate) that will check if the value of the column is valid. You may think about it as a column validator. This is described here https://en.wikipedia.org/wiki/Check_constraint. Leave it empty if you don't want any check.