Search code examples
oraclesql-delete

How to delete employees rows having less salary than avg salary, in Oracle ?


Hey I want to delete all the employee records having salary less than avg salary in oracle.What is the correct way to do so and how should I go for it ?


Solution

  • delete from tableEmp where columnSal < (select avg(columnSal) from tableEmp)