Question
7. Perform the following SQL DELETE statements. Be sure to do them in order. Issue a COMMIT command after all DELETEs have run. Try to
7. Perform the following SQL DELETE statements. Be sure to do them in order. Issue a COMMIT command after all DELETEs have run.
Try to delete Professor 389. What message do you get? ___________________________
Delete Student 2166.
Now Delete Professor 389. Explain why the first attempt in a. was unsuccessful, and this time the DELETE was successful.
Hand in: A listing of the DELETE statements.
The answers to questions a. b. and c.
A listing of the two tables after the deletes have run.
8. Perform the following UPDATE commands. Issue a COMMIT command after all UPDATEs have run.
Replace the value of the Prof_ID for Student 4520 with 243.
Add 10% to the salary for each professor
ALSO: A listing of the UPDATE statements
A listing of the two tables after the UPDATEs have run.
Professor Table:
Prof_ID | Prof_Lname | Prof_Hiredate | Prof_Sal | Prof_Dept |
123 | Hilbert | 20-MAY-1992 | 58000.00 | MATH |
243 | Newell | 15-JUL-1997 | 65500.00 | CMPSCI |
389 | Lessing | 04-APR-1988 | 40250.00 | ENG |
Student Table:
Stu_ID | Stu_Lname | Stu_Major | Stu_CredHrs | Stu_GradePts | Prof_ID |
2001 | Parker | CMPSCI | 52 | 160 | 243 |
2166 | Smith | ENG | 30 | 75 | 389 |
3200 | Garcia | MATH | 62 | 248 | 123 |
4520 | Smith | CMPSCI | 45 | 157 | NULL |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started