SQL Exam Review: CASE, Stored Procedures, Filtering, Grouping, and Joins

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/23

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering fundamental SQL concepts from the term exam review quiz, including CASE expressions, stored procedure management, grouping, filtering logic, data types, and joins.

24 Terms

1
New cards

WHERE Clause (vs. HAVING)

A SQL clause that filters individual rows before grouping and aggregation occur in a query.

2
New cards

HAVING Clause

A SQL clause used in queries with a GROUP BY clause to filter groups after aggregation has been performed.

3
New cards

CASE Expression

A SQL conditional expression that introduces if-then-else logic directly inside a SELECT statement or query.

4
New cards

END Keyword

The required SQL keyword used to terminate and close a CASE expression.

5
New cards

ELSE Clause (in CASE)

An optional clause in a CASE expression that specifies the fallback result for rows that do not satisfy any of the WHEN conditions.

6
New cards

WHEN Keyword

The SQL keyword used to introduce a conditional evaluation inside a CASE expression.

7
New cards

CREATE PROCEDURE

The SQL data definition statement used to define and create a new stored procedure in a database.

8
New cards

CALL Statement

The SQL command used in MySQL to invoke and execute a stored procedure.

9
New cards

IN Parameter Mode

A parameter mode in stored procedures that accepts an input value passed into the procedure from the caller.

10
New cards

DROP PROCEDURE

The SQL statement used to delete and remove an existing stored procedure from the database.

11
New cards

Stored Procedure

A saved collection of SQL code stored inside the database that can be reused and executed repeatedly.

12
New cards

DELIMITER Statement

A MySQL command that temporarily redefines the statement terminator (for example, to $$) so internal semicolons in a procedure body do not end the definition prematurely.

13
New cards

PRIMARY KEY

A column constraint (such as member_id INT PRIMARY KEY) that uniquely identifies each individual record in a database table.

14
New cards

DATE Data Type

The SQL data type designed to store calendar dates without times, commonly used for attributes such as a publication date.

15
New cards

VARCHAR Data Type

A variable-length character data type specified with a maximum character length, such as VARCHAR(6060) for text up to 6060 characters.

16
New cards

BETWEEN … AND Operator

A SQL comparison operator used to filter rows within an inclusive range between two specified boundary values.

17
New cards

LIKE Operator

A SQL pattern-matching operator that uses wildcard characters, such as 'M%' to match any string starting with the letter M.

18
New cards

Logical Operator Precedence (AND vs. OR)

The rule in SQL where the AND operator is evaluated before the OR operator, requiring parentheses around OR conditions when combined with AND.

19
New cards

ORDER BY … DESC

A SQL sorting clause that arranges query output in descending order, placing the highest or most expensive values at the top.

20
New cards

GROUP BY Clause

A SQL clause that aggregates rows sharing identical values in specified columns into summary rows for aggregate functions like COUNT().

21
New cards

INNER JOIN

A relational join operation that returns only the rows that have matching key values in both tables being joined.

22
New cards

LEFT JOIN

An outer join that returns all records from the left table, along with matched records from the right table, filling with NULL when no match exists.

23
New cards

INT Data Type Limitation

A characteristic of the integer type whereby storing non-integer values (such as prices like 249.50249.50) results in the truncation or loss of the decimal portion.

24
New cards

UNION Operator

A set operator that combines the output sets of two SELECT queries into a single list while automatically removing duplicate rows.