• ¿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 4 fuera de 50 páginas
Examen

WGU C170 SQL STUDY GUIDE 2026/2027 | Most Important SQL Commands | Database Applications | Pass Guaranteed - A+ Graded

Document preview thumbnail
Vista previa 4 fuera de 50 páginas

Master the most important SQL commands for the WGU C170 Database Applications exam with this comprehensive 2026/2027 SQL study guide. This A+ Graded resource contains essential SQL commands and explanations covering all critical command categories including Data Definition Language (DDL) - CREATE, ALTER, DROP, TRUNCATE, RENAME; Data Manipulation Language (DML) - SELECT, INSERT, UPDATE, DELETE, MERGE; Data Query Language (DQL) - SELECT with various clauses; Data Control Language (DCL) - GRANT, REVOKE; Transaction Control Language (TCL) - COMMIT, ROLLBACK, SAVEPOINT, SET TRANSACTION. Key SQL command details include CREATE DATABASE, CREATE TABLE with data types (INT, VARCHAR, DATE, DECIMAL, CHAR, TEXT, BOOLEAN, TIMESTAMP) and constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, DEFAULT), ALTER TABLE (ADD, DROP, MODIFY COLUMN, RENAME COLUMN, ADD/DROP CONSTRAINT), DROP TABLE and DROP DATABASE, TRUNCATE vs DELETE differences, SELECT with WHERE (comparison operators IN, BETWEEN, LIKE, IS NULL), AND/OR/NOT logical operators, ORDER BY (ASC/DESC), GROUP BY with HAVING, JOIN types (INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER, CROSS, SELF JOIN), subqueries (scalar, row, table, correlated), set operations (UNION, UNION ALL, INTERSECT, EXCEPT/MINUS), aggregate functions (COUNT, SUM, AVG, MIN, MAX, DISTINCT), INSERT INTO (single row, multiple rows, SELECT results), UPDATE with WHERE clause, DELETE with WHERE clause, indexed views, SQL wildcards (% and _), and string functions (CONCAT, SUBSTRING, UPPER, LOWER, LENGTH, TRIM, REPLACE). Each command includes syntax examples and clear rationales to reinforce SQL proficiency. Perfect for WGU students preparing for the C170 Database Applications objective assessment. With our Pass Guarantee, you can confidently master SQL commands for your exam. Download your complete WGU C170 SQL Commands Study Guide instantly!

Vista previa del contenido

WGU C170 SQL STUDY GUIDE 2026/2027 | Most Important
SQL Commands | Database Applications | Pass Guaranteed -
A+ Graded



Section 1: Data Query Language (DQL) - SELECT Fundamentals
(Q1-18)


Q1. Consider the following table structure:

sqlCopy

CREATE TABLE employees (
emp_id INT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
department VARCHAR(50),
salary DECIMAL(10,2)
);


Which query correctly retrieves only the first and last names of all employees?


A. SELECT * FROM employees WHERE first_name, last_name;


B. SELECT first_name AND last_name FROM employees;


C. SELECT first_name, last_name FROM employees; [CORRECT]


D. GET first_name, last_name FROM employees;

,Rationale: The correct syntax uses SELECT followed by comma-separated column

names and FROM to specify the table. Option A incorrectly places columns after WHERE,

B uses AND instead of a comma, and D uses invalid GET keyword.


Correct Answer: C



Q2. Given the employees table from Q1, which query retrieves all columns for all rows?


A. SELECT ALL FROM employees;


B. SELECT * FROM employees; [CORRECT]


C. SELECT EVERYTHING FROM employees;


D. SELECT columns FROM employees;


Rationale: The asterisk (*) is the ANSI SQL wildcard for all columns. Option A uses ALL

incorrectly (it modifies SELECT for duplicates, not column selection), C is not valid SQL,

and D is syntactically incorrect.

Correct Answer: B



Q3. Consider the employees table with the following data:

Table


emp_id first_name last_name department salary

, 1 John Smith Sales 5000
0



2 Jane Doe Sales 5500
0



3 Bob Johnson IT 6000
0



4 Alice Williams IT 6000
0


Which query returns only unique department names?


A. SELECT department FROM employees GROUP BY department;


B. SELECT UNIQUE department FROM employees;


C. SELECT DISTINCT department FROM employees; [CORRECT]


D. SELECT department FROM employees DISTINCT;


Rationale: DISTINCT eliminates duplicate rows and must appear immediately after

SELECT. Option A groups but doesn't necessarily return only unique values without

aggregation, B uses incorrect UNIQUE keyword, and D places DISTINCT in the wrong

position.

Correct Answer: C



Q4. Given the employees table, which query returns the first 3 rows only?

, A. SELECT * FROM employees LIMIT 3; [CORRECT]


B. SELECT * FROM employees TOP 3;


C. SELECT FIRST 3 * FROM employees;


D. SELECT * FROM employees FIRST 3;


Rationale: LIMIT is the ANSI SQL:2023 standard for restricting result rows. Option B

uses TOP which is T-SQL (SQL Server) syntax and must appear after SELECT, C and D

use invalid syntax for limiting rows.

Correct Answer: A



Q5. Which query correctly uses TOP syntax for SQL Server to return the first 5 rows from

the employees table?


A. SELECT TOP 5 * FROM employees; [CORRECT]


B. SELECT * TOP 5 FROM employees;


C. SELECT * FROM employees TOP 5;


D. SELECT FIRST 5 * FROM employees;


Rationale: In T-SQL (SQL Server), TOP must appear immediately after SELECT. Options

B, C, and D all place TOP or FIRST in incorrect positions within the query.


Correct Answer: A



Q6. Consider this query:

Información del documento

Subido en
11 de mayo de 2026
Número de páginas
50
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$16.50

¿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.
NURSEPEARSONVUE
3.5
(33)
Vendido
131
Seguidores
34
Artículos
1896
Última venta
7 horas 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