I have written this query on oracle database.
Select salary from emp having salary < (SELECT MAX(SALARY) FROM EMP ));
http://sqlfiddle.com/#!4/47961/13
But it is not working .
Where am i wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you can apply
havingclause where you used group by , here there is no group by than just usewhereThe HAVING Clause
The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions.