在MySQL中使用日期和时间函数(如 )时,是否可以将间隔单元存储在列中并在查询中使用?----+---------------------------------------------------+------+-----+---------+----------------+select * from snapshotSchedule_entry order by date_add(now(), interval everyFrequency month
由: org.hibernate.hql.internal.ast.QuerySyntaxException:意外令牌引起的:间隔接近
private static final String USERS_NOT_ACTION_IN_LAST_MONTH = select u from myTable u where u.lastDate + INTERVAL 30 DAY <= CURDATE();
public List<MyEntity> getItemOlderThanMonth() {
Query q = _en