php - MySQL: Every derived table must have its own alias -
this question has answer here:
- every derived table must have own alias 3 answers
update `flightschedule` set delay=( select * ( select minute(eta - sta) `flightschedule` `flightnum_arr` = '3517' ) ) `flightnum_arr` = '3517';
says "every derived table must have own alias". how fix issue?
fixing - shown in error message:
update `flightschedule` set delay= (select update_field ( select minute (eta - sta) update_field `flightschedule` `flightnum_arr`='3517' ) internal_0 ) `flightnum_arr`='3517';
but above there more correct suggestion - rid of nested subquery @ (see gordon's answer).
edit (based on comments):
if want find difference, use timediff function:
update `flightschedule` set delay = timediff(eta - sta) `flightnum_arr`='3517';
Comments
Post a Comment