Quantcast
Channel: Mysql query - Event to delete rows by its value - Database Administrators Stack Exchange
Browsing all 3 articles
Browse latest View live

Answer by Rick James for Mysql query - Event to delete rows by its value

To fix the syntax error:DELETE FROM events WHERE check_in < (NOW() - INTERVAL 1 DAY)That won't land on midnight. Instead change to:DELETE FROM events WHERE check_in < CURDATE() - INTERVAL 1...

View Article



Mysql query - Event to delete rows by its value

need help hereI want a query to delete all rows in which column value is older than today.One of the columns is 'check_in' (values in timestamp format) and I want the query to identify the row that has...

View Article

Answer by prasad_ for Mysql query - Event to delete rows by its value

Basically, i want to create an event that every day delete rows wherecheck_in value in older than today.Using MySQL 8.0.34:CREATE TABLE ts ( c1 INT AUTO_INCREMENT PRIMARY KEY, c2 TIMESTAMP NOT...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images