Hi, By looking at your sub query you should write delete from emp1 where sal in(your inner query).
Its fetching more than one row as you have grouped by sal and you should use in rather than = On 28-Oct-2013 8:58 PM, "Rajesh" <[email protected]> wrote: > Hi all, > > delete from emp1 > where sal=(select max(sal) from emp1 > group by sal > having > count(empno||ename)>1); > > I ran the above query and returns an error like this ORA-01427: single-row >> subquery returns more than one row > > > > > Thank you in advanced. > > -- > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Oracle PL/SQL" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en --- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
