Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Querying Where date_created without time is same as last_updated without time
- SELECT * FROM table_name
- WHERE DATE(date_created) = DATE(last_updated)
- SELECT *
- FROM table_name
- WHERE DATE_FORMAT(date_created, '%Y-%m-%d') = DATE_FORMAT(last_updated, '%Y-%m-%d')
- SELECT *
- FROM table_name
- WHERE day(date_created) = day(last_updated) and
- month(date_created) = month(last_updated) and
- year(date_created) = year(last_updated)
Advertisement
Add Comment
Please, Sign In to add comment