Trying to prohibit writing zero values in the datetime field
ALTER TABLE test ADD CONSTRAINT chk_dt CHECK (UNIX_TIMESTAMP(dt) != 0) Does not work. Table already created
Trying to prohibit writing zero values in the datetime field
ALTER TABLE test ADD CONSTRAINT chk_dt CHECK (UNIX_TIMESTAMP(dt) != 0) Does not work. Table already created
Source: https://ru.stackoverflow.com/questions/620077/
All Articles