Use comparison operators to write a question that the database will understand. Which records contain "no"?

Responses

is no
is no

=yes
=yes

<>no
<>no

=no

1 answer

To write a question that the database will understand and identify records containing "no," you could use the following comparison operator:

WHERE column_name = 'no'

This SQL statement checks for records in "column_name" that have the value "no". If you're looking to include comparisons that consider cases like 'no' vs 'yes', you might phrase it as:

WHERE column_name <> 'yes'

This checks for records that do not have the value 'yes', effectively pointing out that they could be "no" or other values. If "no" is the only value of interest, then the first example is more direct.

In the context of the responses you provided, the best match for identifying records with "no" could be interpreted from:

  • =no
  • is no

Assuming you're interested in identifying "no" explicitly, the clean SQL style would be = 'no'.