Applications (2026) Q&A | WGU
1. Which SQL statement is used to remove all rows from a table without
deleting the table structure?
A) DELETE * FROM table_name
B) DROP TABLE table_name
C) TRUNCATE TABLE table_name
D) REMOVE TABLE table_name
Correct Answer: C) TRUNCATE TABLE table_name
Rationale: TRUNCATE deletes all rows while preserving the table structure and
resets any auto-increment counters. DELETE without a WHERE clause also
removes all rows but logs individual row deletions and does not reset identity.
DROP removes the entire table.
2. In a database, a primary key constraint ensures that a column contains:
A) Unique values only
B) Unique and NOT NULL values
C) Only numeric values
D) A default value
Correct Answer: B) Unique and NOT NULL values
,Rationale: A primary key uniquely identifies each row and cannot contain
NULLs. Unique constraints allow NULLs (unless also NOT NULL). A primary key is
a combination of uniqueness and mandatory data.
3. An Entity‑Relationship (ER) diagram uses a diamond shape to represent a:
A) Entity
B) Attribute
C) Relationship
D) Key constraint
Correct Answer: C) Relationship
Rationale: In ER diagrams, entities are rectangles, attributes are ovals, and
relationships are diamonds. The diamond connects related entities and often
contains a verb describing the association.
4. Which SQL keyword is used to sort the result set in descending order?
A) SORT DESC
B) ORDER BY DESC
C) ORDER BY column_name DESC
D) GROUP BY DESC
Correct Answer: D) ORDER BY column_name DESC
, Rationale: The ORDER BY clause sorts rows; ASC is the default. Using ORDER BY
column DESC returns rows from highest to lowest. SORT is not a valid SQL
command.
5. Normalization to third normal form (3NF) eliminates:
A) Partial dependencies
B) Transitive dependencies
C) Repeating groups
D) Multivalued dependencies
Correct Answer: B) Transitive dependencies
Rationale: 3NF requires that every non‑prime attribute is non‑transitively
dependent on the primary key. 1NF removes repeating groups; 2NF removes
partial dependencies; 3NF removes transitive dependencies.
6. The SQL command used to add a new column to an existing table is:
A) ALTER TABLE table_name ADD column_name datatype
B) MODIFY TABLE table_name ADD column_name
C) INSERT COLUMN INTO table_name
D) UPDATE TABLE table_name SET column_name
Correct Answer: C) ALTER TABLE table_name ADD column_name datatype