Hello again
He, what about the 66 whales, could any of them be rescued?
Hell yeah, '07:20:00' AND '15:19:59' evaluates to 1! I have never seen other database systems than mysql doing seriously boolean algebra on time strings! Though this be kind of compensation for the below rough violation of ANSI SQL standard aliases? (now() of 1st line can differs from 2nd and 3rd lines ones!)
No, your case is not correct. I would make use of such a construct:
select time(now()) as "too sad, mysql cannot use this alias elsewhere",
case
when (time(now()) between '07:20:00' and '15:19:59') then 'The early bird catches the worm'
when (time(now()) between '15:20:00' and '23:19:59') then 'We are from swinging'
else 'Nighty night everyone!'
end as "what a pitty";
/*
too sad, mysql cannot use this alias elsewhere what a pitty
--------------------------------------------------------------------
15:50:42 We are from swinging
*/
-- tesu
(btw, a practial example like your earlier one would help much)