在MySQL中查询前一天数据的方法有以下几种:
SELECT * FROM table_name WHERE DATE(date_column) = DATE_SUB(CURDATE(), INTERVAL 1 DAY);
SELECT * FROM table_name WHERE DATE(date_column) = DATE_ADD(CURDATE(), INTERVAL -1 DAY);
SELECT * FROM table_name WHERE DATEDIFF(date_column, CURDATE()) = -1;
SELECT * FROM table_name WHERE DATE(date_column) = CURDATE() - INTERVAL 1 DAY;