D427 UPDATED ACTUAL Exam Questions
and CORRECT Answers
1) What does the pattern 'A%' match when used with the LIKE operator?
A. Languages starting with 'A' and ending with 'n'
B. Languages starting with 'A' followed by any number of characters
C. Languages starting with 'A' and exactly one character after
D. Languages containing 'A' anywhere in the word; - CORRECT ANSWER - B.
Languages starting with 'A' followed by any number of characters
2) When joining tables with columns of the same name, what is used to distinguish between
them?
A. Table prefixes
B. Column suffixes
C. Table aliases
D. Subqueries - CORRECT ANSWER - A. Table prefixes
3) Which join combines two tables without comparing columns, resulting in all possible
combinations of rows?
A. Inner join
B. Cross join
C. Left join
D. Equijoin - CORRECT ANSWER - B. Cross join
4) What does the following SQL query return?
,SELECT CountryCode, District, COUNT(*)
FROM City
GROUP BY CountryCode, District
HAVING COUNT(*) >= 2;
A. Cities where the population is at least 2
B. Countries and districts that have at least 2 cities
C. Districts with at least 2 countries
D. Total number of cities in each country - CORRECT ANSWER - B. Countries and
districts that have at least 2 cities
5) Which SQL clause is used to combine rows from two or more tables, based on a related
column between them?
A. SELECT
B. JOIN
C. WHERE
D. GROUP BY - CORRECT ANSWER - B. JOIN
6) Which of the following statements about aggregate functions and NULL values is true?
A. Aggregate functions consider NULL values as zero
B. Aggregate functions ignore NULL values
C. Aggregate functions return NULL if any value is NULL
D. Aggregate functions cannot be used on columns with NULL values - CORRECT
ANSWER - B. Aggregate functions ignore NULL values
7) Which of the following is NOT an advantage of using views?
,A. Protecting sensitive data by hiding certain columns
B. Saving complex queries for reuse
C. Improving performance by always storing view data
D. Saving optimized queries for consistent performance - CORRECT ANSWER - C.
Improving performance by always storing view data
8) Which of the following is a valid use of the GROUP BY clause?
A. To filter rows based on an aggregate function
B. To sort the result set
C. To group rows that have the same values in specified columns
D. To limit the number of returned rows - CORRECT ANSWER - C. To group rows that
have the same values in specified columns
9) The BETWEEN operator is equivalent to which of the following expressions?
A. value > minValue AND value < maxValue
B. value >= minValue AND value <= maxValue
C. value >= minValue OR value <= maxValue
D. value BETWEEN minValue OR maxValue - CORRECT ANSWER - B. value >=
minValue AND value <= maxValue
10) Which clause in SQL is used to sort the result-set in ascending or descending order?
A. GROUP BY
B. ORDER BY
C. HAVING
D. WHERE - CORRECT ANSWER - B. ORDER BY
, 11) What is the correct order of clauses in an SQL SELECT statement?
A. SELECT, WHERE, GROUP BY, HAVING, ORDER BY
B. SELECT, GROUP BY, WHERE, HAVING, ORDER BY
C. SELECT, WHERE, HAVING, GROUP BY, ORDER BY
D. SELECT, HAVING, WHERE, GROUP BY, ORDER BY - CORRECT ANSWER - A.
SELECT, WHERE, GROUP BY, HAVING, ORDER BY
12) In the expression `Name BETWEEN 'Anele' AND 'Jose'`, which data type must the Name
column have for this expression to be valid?
A. INT
B. DATE
C. VARCHAR
D. BOOLEAN - CORRECT ANSWER - C. VARCHAR
13) In SQL, which clause is evaluated first in a SELECT statement with GROUP BY and
HAVING clauses?
A. SELECT
B. GROUP BY
C. WHERE
D. FROM - CORRECT ANSWER - D. FROM
14) How can you match the literal character '%' in a LIKE pattern?
A. By enclosing it in brackets: LIKE '[%]'
B. By escaping it with a backslash: LIKE '\%'