If you have MySql version above 5.6 you could use TIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2) something like
select * from MyTab T where
TIMESTAMPDIFF(MINUTE,T.runTime,NOW()) > 20
More Related Contents:
- Group mysql query by 15 min intervals
- How to select rows that have current day’s timestamp?
- When is a timestamp (auto) updated?
- how to delete data from table A besides the customer service and director data in table B?
- SQL split values to multiple rows
- Get records with max value for each group of grouped SQL results
- How to populate a table with a range of dates?
- MYSQL OR vs IN performance
- ERROR 1452: Cannot add or update a child row: a foreign key constraint fails
- How to find gaps in sequential numbering in mysql?
- Convert timestamp to date in MySQL query
- Update a column value, replacing part of a string
- MySQL: View with Subquery in the FROM Clause Limitation
- MySql export schema without data
- MySQL combine two columns into one column
- MySQL Insert Into from one Database in another
- MySQL: LIMIT by a percentage of the amount of records?
- limiting the rows to where the sum a column equals a certain value in MySQL
- MySQL multiple columns in IN clause
- MySQL Inner Join Query Multiple Tables
- GROUP BY – do not group NULL
- Composite key as foreign key (sql)
- MySQL 1062 – Duplicate entry ‘0’ for key ‘PRIMARY’
- MySQL LEFT JOIN 3 tables
- How to select data where a field has a min value in MySQL?
- Update MySQL with if condition
- “Unknown column in ‘field list'”, but column does exist
- How do I combine the results of two queries with ordering?
- ERROR 1115 (42000): Unknown character set: ‘utf8mb4’
- MYSQL Select One Random record from each Category