Created
October 30, 2015 14:44
-
-
Save stevenmc/659a27bf5a1300b274c4 to your computer and use it in GitHub Desktop.
Set default value of mysql field to function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TRIGGER before_insert_news_item | |
BEFORE INSERT ON news | |
FOR EACH ROW | |
SET new.created = now(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment