nerdexam
CompTIA

LX0-104 · Question #89

Which of the following words is used to restrict the records that are returned from a SELECT SQL query based on a supplied criteria for the values in the records?

The correct answer is C. WHERE. The WHERE clause in an SQL SELECT statement is used to filter rows based on specified conditions. It restricts the records returned to only those that satisfy the criteria.

Shells, Scripting and Data Management

Question

Which of the following words is used to restrict the records that are returned from a SELECT SQL query based on a supplied criteria for the values in the records?

Options

  • ACASE
  • BFROM
  • CWHERE
  • DIF

How the community answered

(51 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    92% (47)
  • D
    4% (2)

Why each option

The `WHERE` clause in an SQL `SELECT` statement is used to filter rows based on specified conditions. It restricts the records returned to only those that satisfy the criteria.

ACASE

CASE is a conditional expression used for defining different outcomes based on conditions, not for filtering rows.

BFROM

FROM specifies the table(s) from which to retrieve data, not for filtering records based on values.

CWHERECorrect

The `WHERE` keyword in a `SELECT` SQL query is specifically designed to apply a filtering condition to the rows of a table. Only rows where the `WHERE` clause condition evaluates to true are included in the result set, thereby restricting the returned records based on specific criteria.

DIF

IF is a conditional function available in some SQL dialects, but WHERE is the standard clause for filtering rows in a SELECT statement.

Concept tested: SQL SELECT statement - filtering data

Source: https://learn.microsoft.com/en-us/sql/t-sql/queries/select-where-transact-sql

Topics

#SQL queries#SELECT statement#WHERE clause

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice