CS-10337 – Applied Database Technologies� Lecture 4
By Prof. Rafael Orta
Wayground
Last class we covered
Agenda
Retrieving Data
Retrieving all the rows
Retrieving selected columns
Retrieving selected columns
Using between
Using the distinct clause
Calculated values and Alias
Order of Operations
Arithmetic Operations
Column Aliases
Column Aliases
Using Functions
Using functions
Comparison Operators
Use of the where clause
Use of the like function
The in and between clause
Using regular expressions
Using regular expressions
Using regular expressions
Using NULL
Using NULL
Order By Clause
Order By Clause
Use of the limit clause
Working with Dates
Using Variables
Supplemental Video(s)
Supplemental Reading
Knowledge Check
Which of the following statements about SQL filtering is true?
A. The IN clause can only accept numeric values, not strings.�B. The BETWEEN operator excludes the boundary values.�C. The LIKE operator can use % for multiple characters and _ for a single character.�D. The DISTINCT keyword sorts rows alphabetically by default.
Correct Answer: C
Use of Joins
Simple Inner joins
Simple Inner joins
Simple Inner joins
Simple Inner joins
Simple Inner joins
Simple Inner joins
Simple Inner joins
Outer vs Inner Joins
Outer Joins
Outer Joins
Left Outer Joins
Right Outer Joins
Joins using the USING Keyword
Natural Joins
Cross Joins
Cross Joins
Attendance
Unions
Unions
Unions
Supplemental Video(s)
Supplemental Reading
Knowledge Check
Which of the following statements about MySQL joins is true?
A. INNER JOIN returns all rows from the left table even when there’s no match.�B. LEFT JOIN returns all rows from the left table and the matching rows from the right; non-matches have NULL on the right.�C. NATURAL JOIN requires an explicit ON clause listing the join columns.�D. CROSS JOIN filters rows based on a join predicate.
Correct Answer: B
Reference Material used in this presentation