Guest User

Untitled

a guest
Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. update Employee t0 LEFT join EmployeeDetail t1 on (t1.id=t0.id)
  2. set t0.status=1, t1.salary=t1.salary+10000
  3. where t1.salary < 50000 and t1.status=0
  4.  
  5. update Employee set status=1
  6. where id in (select t0.id from
  7. Employee t0 LEFT join EmployeeDetail t1 on (t1.id=t0.id)
  8. where t1.salary < 50000 and t1.status=0)
  9.  
  10. update EmployeeDetail set salary=salary+10000
  11. where id in (select t1.id from
  12. Employee t0 LEFT join EmployeeDetail t1 on (t1.id=t0.id)
  13. where t1.salary < 50000 and t1.status=0)
Add Comment
Please, Sign In to add comment