Questions And Correct Verified Answers Plus Rationales 2026
(GUARANTEED PASS)
Question 1
Which SQL command is used to remove all records from a table but keep
the table structure?
A) DELETE
B) TRUNCATE
C) DROP
D) REMOVE
VERIFIED ANSWER: B) TRUNCATE
Rationale: TRUNCATE removes all rows from a table without affecting its
structure, unlike DROP which deletes the table entirely, and DELETE which
can be slower and uses more transaction log space.
Question 2
What is the default port for MySQL database server?
A) 1521
B) 1433
,C) 3306
D) 5432
VERIFIED ANSWER: C) 3306
Rationale: MySQL uses port 3306 by default. Oracle uses 1521, SQL Server
uses 1433, and PostgreSQL uses 5432.
Question 3
Which SQL statement is used to modify existing data in a table?
A) INSERT
B) UPDATE
C) ALTER
D) MODIFY
VERIFIED ANSWER: B) UPDATE
Rationale: UPDATE is used to change existing rows in a table. INSERT adds
new rows, and ALTER changes table structure.
Question 4
In relational databases, a primary key must be:
A) Nullable
B) Duplicate allowed
,C) Foreign key
D) Unique and not null
VERIFIED ANSWER: D) Unique and not null
Rationale: A primary key uniquely identifies each record in a table and
cannot contain null values or duplicates.
Question 5
Which command in SQL is used to permanently remove a table and its
data?
A) DELETE
B) UPDATE
C) DROP TABLE
D) TRUNCATE
VERIFIED ANSWER: C) DROP TABLE
Rationale: DROP TABLE deletes the table structure and all its data
permanently. TRUNCATE removes data only.
Question 6
Which of the following is a non-relational database?
, A) MySQL
B) PostgreSQL
C) Oracle
D) MongoDB
VERIFIED ANSWER: D) MongoDB
Rationale: MongoDB is a NoSQL (non-relational) database that stores data
as documents in BSON format rather than in tables with rows and
columns.
Question 7
Which SQL clause is used to filter rows returned by a query?
A) FROM
B) WHERE
C) GROUP BY
D) HAVING
VERIFIED ANSWER: B) WHERE
Rationale: WHERE filters rows based on specified conditions before any
grouping occurs. HAVING filters after grouping.
Question 8