How to add a constraint to check if the date entered (column) is today's date I was having this "database" exam and I bumped into the following question.

Alter table "x" to add a constraint that only lets you enter today's date in "x.datecolumb". 

I clearly have no idea how to do so, so ...?
In all MySQL versions 


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


MySQL Reference Manual, CREATE TABLE Syntax 

The only way to solve Your problem seems to be a trigger pack checked constraint You need and discarded wrong data insertion. But this solution is not complete - there is a lot of situations when inserting/altering data do not fire the trigger action.