MySQL Forums
Forum List  »  Newbie

Re: Error:1248
Posted by: Phillip Ward
Date: July 18, 2018 08:05AM

What's wrong with ...

select avg(empsal) from Employee ;

... then put that into a variable and use it to do the second, real query?

select count( * ) c 
from Employee 
where empsal > ? ;

There's an awful lot to be said for keeping things simple.

Regards, Phill W.

Options: ReplyQuote

Written By
July 17, 2018 09:49PM
Re: Error:1248
July 18, 2018 08:05AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.