notifications - How can I use MySQL alias in Where condition -
i have column date of months in table,
table_date
17
13
12
04
check these date lesser current date
trying, or there other better way.
select concat(date_format(now(),'%y-%m'),'-',table_date) duedate dhr due date < curdate()
have error as
unknown column 'duedate' in 'where clause'
i found concatenating must done in condition
select table_date table_name concat(date_format(now(),'%y-%m'),'-',table_date) < curdate()
Comments
Post a Comment