cset3300-module-2c

But can also be used with update and insert 5 sub

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: not know the exact value •Most often used with SELECTS...but can also be used with UPDATE and INSERT 5 Sub-Queries •Find all courses that have the same number of credits as “CSET3300” • find the number of credits for CSET3300 • find all courses with that number of credits 6 Sub-Queries •Find all courses that have the same number of credits as “CSET3300” • find the number of credits for CSET3300 • find all courses with that number of credits SELECT * FROM courses WHERE credits = (SELECT credits FROM courses WHERE courses_no = “CSET3300”) 6 Sub-Queries •Find all courses that have the same number of credits as “CSET3300” • find the number of credits for CSET3300 • find all courses with that number of credits SELECT * FROM courses WHERE credits = (SELECT credits FROM courses WHERE courses_no = “CSET3300”) + ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­+ | id | course_no | title | credits | + ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­+ | 2 | CSET3300 | Database ­Driven Web Applications | 4 | | 4 | CSET4100 | Server ­Side Programming | 4 | | 5 | EET4250 | Microcomputer Architecture | 4 | + ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­+ ­ ­ ­ ­ ­ ­ ­ ­ ­+ 6 The IN operator •<...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online