Final Prep Exam (Latest Update
2026/2027) Questions and Verified
Answers | 100% Correct | Grade A.
1. Which SQL statement is primarily used to retrieve data from one
or more tables?
A. INSERT
B. UPDATE
C. SELECT
D. DELETE
Rationale: The SELECT statement is the foundation of SQL querying and
is used to retrieve data from database tables. It can be combined with
clauses such as WHERE, GROUP BY, ORDER BY, and JOIN to filter,
organize, and combine results. INSERT adds records, UPDATE modifies
existing records, and DELETE removes records.
2. Which database object stores data in rows and columns?
A. View
B. Index
C. Stored Procedure
D. Table
,Rationale: Tables are the primary structures used to store data in
relational databases. Each table consists of rows (records) and columns
(attributes). Views display query results without storing the underlying
data, indexes improve search performance, and stored procedures
contain executable SQL code.
3. Which SQL clause is used to filter records returned by a query?
A. ORDER BY
B. GROUP BY
C. WHERE
D. HAVING
Rationale: The WHERE clause filters individual rows before grouping or
sorting occurs. It allows users to retrieve only records meeting specified
conditions. HAVING filters grouped results after aggregation, while
ORDER BY sorts data and GROUP BY organizes records into groups.
4. Which key uniquely identifies each record in a table?
A. Foreign Key
B. Composite Key
C. Candidate Key
D. Primary Key
Rationale: A primary key uniquely identifies every row within a table and
cannot contain duplicate or NULL values. It ensures entity integrity and
provides a reliable method for referencing records from other tables.
, 5. Which SQL command adds a new row to a table?
A. UPDATE
B. ALTER
C. INSERT
D. MERGE
Rationale: INSERT is used to add new records into a database table.
UPDATE modifies existing records, ALTER changes the structure of a
table, and MERGE combines insert and update operations under
specified conditions.
6. What is the primary purpose of a foreign key?
A. Encrypt data
B. Improve indexing
C. Enforce relationships between tables
D. Create backup copies
Rationale: A foreign key establishes and enforces referential integrity
between related tables. It ensures that values entered into a child table
correspond to existing values in the referenced parent table.
7. Which SQL statement modifies existing data?
A. DELETE
B. INSERT
C. UPDATE
D. CREATE
, Rationale: UPDATE changes existing records in a table. It can modify one
or multiple rows depending on the WHERE clause. Omitting the WHERE
clause updates every row in the table.
8. Which JOIN returns only rows with matching values in both
tables?
A. LEFT JOIN
B. RIGHT JOIN
C. FULL OUTER JOIN
D. INNER JOIN
Rationale: INNER JOIN returns only records where matching values exist
in both joined tables. Rows without corresponding matches are excluded
from the result set.
9. What does SQL stand for?
A. Structured Query Language
B. Structured Query Language
C. Simple Question Logic
D. Standard Query List
Rationale: SQL stands for Structured Query Language and is the
standard language used to define, manipulate, and retrieve data from
relational database management systems.
10. Which SQL function returns the number of rows in a result
set?