Computer Science 1032A/B : SQL Review.docx

101 views2 pages
salmonrabbit587 and 40047 others unlocked
COMPSCI 1032A/B Full Course Notes
28
COMPSCI 1032A/B Full Course Notes
Verified Note
28 documents

Document Summary

Sql review: create an sql statement to add an instance of the takes relationship to the database. Use the value 250121314 for the sid, the value 191 for the cid, 83 for the mark and 2004 as the year taken. Insert into takes (sid, cid, mark, year taken) Values = ( 250121314 , 191 , 83 , 2004 : create an sql statement to change the city attribute to waterloo for the student with the sid. Where sid = 250520462 : create an sql statement to delete all courses with the cid 207 . Where cid = 207 : create an sql statement to retrieve the names (first and last) of all of the professors who use the office th 3113 . Where office = th 3113 : create an sql statement to retrieve the names (first and last) of all of the professors who have the number 118 somewhere in their phone number extension.