i need to update the enrollment table with the appropriate fee which comes from the course table for all customer taking the course named ‘COURSE NAME’
update from enrollment as e
join course as c on c.coursenumber = e.coursenumber
join customer as cs on cs.customernumber = e.customernumber
set e.amountpaid = course.fee
where e.coursenumber in (select coursenumber from course where course = 'COURSE NAME');
Is that possible in mysql ? I’m new to this DBMS and sql in general.
just remove the
FROMkeyword.or just directly do without
IN