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" <sivasurya...@gmail.com> 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 Oracle-PLSQL@googlegroups.com > To unsubscribe from this group, send email to > oracle-plsql-unsubscr...@googlegroups.com > 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 oracle-plsql+unsubscr...@googlegroups.com. > 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 Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com 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 oracle-plsql+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.