php - MySQL: Every derived table must have its own alias -


this question has answer here:

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

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -