Mysql columns mutual exclusion I want to create a table which has 2 columns that would only allow one of them to have value in the same row.

I tried with CHECK constraint but it not working correctly 

Ex: SQL Fiddle schema example

thanks in advance
The CHECK clause is parsed but ignored by all storage engines.


http://dev.mysql.com/doc/refman/5.7/en/create-table.html
Use trigger instead.