SQL Review.docx

2 Pages
175 Views

Department
Computer Science
Course Code
Computer Science 1032A/B
Professor
Diane Goldstein

This preview shows 80% of the first page. Sign up to view the full 2 pages of the document.
Description
SQL Review 1. 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”) 2. Create an SQL statement to change the city attribute to “Waterloo” for the student with the SID “250121314”. UPDATE STUDENT SET CITY = “Waterloo” WHERE SID = “250520462” 3. Create an SQL statement to delete all courses with the CID “207”. DELETE CID FROM COURSES WHERE CID = “207” 4. Create an SQL statement to retrieve the names (first and last) of all of the professors who use the office “TH 3113”. SELECT FIRSTNAME, LASTNAME FROM PROF WHERE Office = “TH 3113” 5. Create an SQL statement to retrieve the names (first and last) of all of the professors who have the number “118” somewhere in their
More Less
Unlock Document

Only 80% of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


OR

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


OR

By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.


Submit