Formulate a SQL query: reduce each classroom’s capacity by 10 in all classrooms
ID: 3732662 • Letter: F
Question
Formulate a SQL query: reduce each classroom’s capacity by 10 in all classrooms in the ‘Watson’ building. No screenshot is needed.
file link : https://mega.nz/#!t3hhkKSY
The enclosed.sql file defines the following university database where primary key for each table is underlined department.dept-name is primary key (i.., unique) course.title is not unique instructor.name is not globally unique but is unique within the department student.name is not globally unique but is unique within the department student takes ID ID name dept name tot cred section course department advisor title dept name credits s id i id semester building budget time slot ilding room 10 time slot id end time instructor classroom ID ame dept name teaches ID sec id ear capacity salaryExplanation / Answer
update `classroom` SET capacity=capacity-10 WHERE building='Watson';
Here the classroom table is having 3 attributes of building, room_no and capacity. building and room_no are primary keys for the given classroom table. According to given scenario we have to reduce each classroom's capacity by 10 in all classrooms where the building is 'Watson'. I hope the above query will generate the expected output.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.