• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 22 páginas
Examen

SQL Database Fundamentals 2025 60 QA Practice Exam Verified RDBMS

Document preview thumbnail
Vista previa 3 fuera de 22 páginas

SQL Database Fundamentals 2025 — 60 Practice Questions Verified Answers

Vista previa del contenido

SQL Database Fundamentals 2025 — 60 Practice Questions
Verified Answers

Series:
CrashCourses Professional Study Series

Author:
Dr Z. Moomba, MBChB, MRCPsych | BethelWellness Ltd

Exam Target:
SQL Fundamentals

Year:
2025/2026

Format:
60 Questions with Verified Answers and Rationales


>
Author's Note:
This document is an original work produced for the CrashCourses Professional Study Series.
Clinical questions and professional scenarios were composed by Dr Z. Moomba based on current
exam objectives, published guidelines, and evidence-based sources (2024–2025). All patient
names, ages, and case details are fictional. Any resemblance to existing published Q&A banks is
coincidental. For personal study use only — not for reproduction or redistribution.


PART 1: CORE PRINCIPLES & FOUNDATIONS
A systems administrator at a multi-national retail chain must clear out all legacy records from a
staging table called `StagingInventory`. The operation must minimise transaction log growth to
avoid filling the storage drive. Which SQL command best achieves this?
A. DROP TABLE StagingInventory;
B. DELETE FROM StagingInventory;
C. TRUNCATE TABLE StagingInventory;
D. ALTER TABLE StagingInventory DROP ROWS;

Answer: C





,Rationale:
Lead: `TRUNCATE TABLE` is a Data Definition Language (DDL) command that swiftly removes
all records by deallocating the data pages used for storage.
Discriminator: Because it logs page deallocations rather than individual row deletions, it
consumes a fraction of the transaction log space, perfectly satisfying the storage constraint.
Distractor: `DELETE` is a standard row-removal DML command, but it fully logs every single
row deleted, which would rapidly bloat the transaction log for a large table.
Examiner Insight: A table cannot be truncated if it is referenced by an active foreign key
constraint in another table, regardless of whether the child table actually contains any data
[ISO/IEC 9075 SQL Standard].

A logistics manager queries an `EmployeeRoutes` table to find the most experienced drivers.
They want the output ordered by `EmploymentDate`, ensuring the individuals working there the
longest appear at the very top. Which clause guarantees this order?
A. ORDER BY EmploymentDate ASC
B. GROUP BY EmploymentDate DESC
C. ORDER BY EmploymentDate DESC
D. SORT BY EmploymentDate LAST

Answer: A

Rationale:
Lead: The `ORDER BY` clause determines the sorting behavior of a query's result set, with
`ASC` forcing chronological ascending order (oldest to newest dates).
Discriminator: The requirement for the "longest working" employees means the oldest
`EmploymentDate` values must be displayed first, requiring ascending order.
Distractor: `ORDER BY EmploymentDate DESC` would correctly sort the data but in reverse
chronological order, placing the newest hires at the top of the report.
High-Yield Point: If sorting is not explicitly defined by an `ORDER BY` clause, the database
engine returns rows in a non-deterministic sequence that can change between executions
[ANSI SQL-92].

An analyst runs `SELECT COUNT(DiscountCode) FROM Sales;` against a retail database. What
precise calculation does the database engine perform?
A. It tallies the sum of all numeric values within the discount code column.
B. It returns the absolute total of all rows present in the `Sales` table.
C. It counts every row where the `DiscountCode` column is not NULL.




, D. It calculates the total number of distinct discount codes utilized.

Answer: C

Rationale:
Lead: The `COUNT(column_name)` aggregate function evaluates the specified column and
increments its counter only when it encounters a non-NULL value.
Discriminator: By explicitly naming `DiscountCode` inside the parentheses, the function is
instructed to ignore any rows where this specific field is empty (NULL).
Distractor: Returning the absolute total of all rows regardless of NULLs is achieved using
`COUNT(*)`, which is a common point of confusion for beginners.
Clinical Pearl: To count exclusively unique occurrences of non-NULL values, the `DISTINCT`
keyword must be nested within the function: `COUNT(DISTINCT DiscountCode)` [PostgreSQL
16 Documentation].

During a system upgrade for a regional university, a database architect needs to append a
`GraduationYear` column to an existing `Alumni` table. Which category of SQL commands
handles this structural alteration?
A. Data Manipulation Language (DML)
B. Data Definition Language (DDL)
C. Data Control Language (DCL)
D. Transaction Control Language (TCL)

Answer: B

Rationale:
Lead: Data Definition Language (DDL) encompasses commands that define or modify the
database schema, such as `CREATE`, `ALTER`, and `DROP`.
Discriminator: Adding a new column structurally changes the table blueprint (via `ALTER
TABLE`), which firmly categorises the operation as DDL.
Distractor: Data Manipulation Language (DML) manages the actual data payloads (rows) via
`INSERT`, `UPDATE`, and `DELETE`, but it cannot change the table's architecture.
Key Principle: In databases like Oracle and MySQL, executing any DDL command automatically
triggers an implicit commit of the current transaction, preventing rollback [Oracle Database
Concepts 2024].

A cybersecurity auditor searches a `ServerLogs` table for error codes starting with 'ERR-'
followed by exactly three alphanumeric characters. Which standard `LIKE` pattern accurately
filters for this string length?

Información del documento

Estudio
Subido en
23 de marzo de 2026
Número de páginas
22
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$15.98

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
CrashCourses
4.7
(9)
Vendido
145
Seguidores
49
Artículos
664
Última venta
7 meses hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes