Last active
December 28, 2015 23:19
-
-
Save kakha13/7577866 to your computer and use it in GitHub Desktop.
Select from Table row from user that was recorded more than one day ago.
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
-- BY Kakha Giorgashvili | |
-- Select Older than 1 day rows | |
SELECT | |
* | |
FROM | |
column_name | |
WHERE | |
USER = '1234' | |
AND added_time < DATE_ADD(NOW(), INTERVAL - 1 DAY) | |
AND added_time <> '0000-00-00 00:00:00' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Select Older than 1 day rows - SQL query
How it Works?
query is selecting row what is older than one day width code:
and this:
Web Site: WWW.ANY.GE