WGU D325 LESSON 4.6.11 LESSON REVIEW
& MODULE 4 QUIZ |PA| PRE-ASSESSMENT |
EXAM QUESTIONS AND ANSWERS|| LATEST
UPDATE 2026
1. What is the primary purpose of a FOREIGN KEY?
A. To uniquely identify each row in a table
B. To enforce referential integrity between tables
C. To improve query performance
D. To prevent NULL values
✅ Correct Answer: B
Rationale:
A FOREIGN KEY ensures that values in one table correspond to valid values in another table’s
PRIMARY KEY, maintaining referential integrity. It does not guarantee uniqueness or
performance.
2. Which SQL statement correctly creates a table with a PRIMARY KEY?
A.
CREATE TABLE students (
student_id INT PRIMARY,
name VARCHAR(50)
);
B.
CREATE TABLE students (
student_id INT,
PRIMARY KEY student_id
);
C.
CREATE TABLE students (
student_id INT PRIMARY KEY,
name VARCHAR(50)
);
, D.
CREATE TABLE students (
student_id INT,
name VARCHAR(50),
KEY PRIMARY (student_id)
);
✅ Correct Answer: C
Rationale:
PRIMARY KEY must be declared correctly in-line or as a table constraint. Option C uses valid
SQL syntax recognized in Oracle-style SQL used by WGU.
3. What happens when a PRIMARY KEY constraint is applied to a column?
A. The column can contain duplicate values
B. The column can contain NULL values
C. The column must be unique and NOT NULL
D. The column becomes indexed only
✅ Correct Answer: C
Rationale:
A PRIMARY KEY automatically enforces uniqueness and NOT NULL constraints.
4. Which clause is used to limit the rows returned by a SELECT statement?
A. GROUP BY
B. WHERE
C. ORDER BY
D. HAVING
✅ Correct Answer: B
Rationale:
WHERE filters rows before grouping occurs. HAVING filters after aggregation.
5. Which SQL keyword is used to combine rows from two or more tables?
& MODULE 4 QUIZ |PA| PRE-ASSESSMENT |
EXAM QUESTIONS AND ANSWERS|| LATEST
UPDATE 2026
1. What is the primary purpose of a FOREIGN KEY?
A. To uniquely identify each row in a table
B. To enforce referential integrity between tables
C. To improve query performance
D. To prevent NULL values
✅ Correct Answer: B
Rationale:
A FOREIGN KEY ensures that values in one table correspond to valid values in another table’s
PRIMARY KEY, maintaining referential integrity. It does not guarantee uniqueness or
performance.
2. Which SQL statement correctly creates a table with a PRIMARY KEY?
A.
CREATE TABLE students (
student_id INT PRIMARY,
name VARCHAR(50)
);
B.
CREATE TABLE students (
student_id INT,
PRIMARY KEY student_id
);
C.
CREATE TABLE students (
student_id INT PRIMARY KEY,
name VARCHAR(50)
);
, D.
CREATE TABLE students (
student_id INT,
name VARCHAR(50),
KEY PRIMARY (student_id)
);
✅ Correct Answer: C
Rationale:
PRIMARY KEY must be declared correctly in-line or as a table constraint. Option C uses valid
SQL syntax recognized in Oracle-style SQL used by WGU.
3. What happens when a PRIMARY KEY constraint is applied to a column?
A. The column can contain duplicate values
B. The column can contain NULL values
C. The column must be unique and NOT NULL
D. The column becomes indexed only
✅ Correct Answer: C
Rationale:
A PRIMARY KEY automatically enforces uniqueness and NOT NULL constraints.
4. Which clause is used to limit the rows returned by a SELECT statement?
A. GROUP BY
B. WHERE
C. ORDER BY
D. HAVING
✅ Correct Answer: B
Rationale:
WHERE filters rows before grouping occurs. HAVING filters after aggregation.
5. Which SQL keyword is used to combine rows from two or more tables?