Created
July 24, 2018 19:55
-
-
Save lasekmiroslaw/41cecd2f93b4daf28073b9a9ece0308e to your computer and use it in GitHub Desktop.
mysql course
This file contains 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 column auto update timestamp: | |
CREATE TABLE comments2 ( | |
content VARCHAR(100), | |
changed_at TIMESTAMP DEFAULT NOW() ON UPDATE CURRENT_TIMESTAMP | |
); | |
Date Math: | |
SELECT birthdt, birthdt + INTERVAL 15 MONTH + INTERVAL 10 HOUR FROM people; | |
Date Format | |
SELECT DATE_FORMAT(birthdt, '%m/%d/%Y at %h:%i') FROM people; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment