I have two tables which are linked with foreign key relationship. Both tables have Created Date columns. How can I find all matching rows where time difference is 5 minutes plus or minus.
I have two tables which are linked with foreign key relationship. Both tables have
Share
You’ll need to use the timestampdiff function and the abs function, something like this:
Documentation for both functions:
http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_abs
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_timestampdiff