oracle - SQL two table Single-row Subquery returns more than one row -


i have 2 tables, chef , meal. trying reduce salary of every chef has not yet made single meal. query

update chef set chef_salary = chef_salary-(chef_salary/100 * 5) chef_id=(select c.chef_id chef c left join meal m on (c.chef_id=m.chef_id) having count(m.chef_id)='0' group c.chef_id);; 

it returns error says "single-row subquery returns more 1 row" doing wrong ?

update chef set chef_salary = chef_salary-(chef_salary/100 * 5) chef_id in (select c.chef_id chef c left join meal m on (c.chef_id=m.chef_id) group c.chef_id having count(m.chef_id)='0' ); 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -