Check date range : Check « Table Index « SQL / MySQL






Check date range

     
mysql>
mysql> CREATE   TABLE EmployeeS_Y
    ->         (EmployeeNO    INTEGER NOT NULL,
    ->          BIRTH_DATE  DATE NOT NULL
    ->                      CHECK(BIRTH_DATE > '1920-01-01'));
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql> drop table Employees_y;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
    
  








Related examples in the same category

1.Using regular expression in check
2.Value must be from another table