What is an alternate way of writing the following statement:
WHERE "column_name" IN ('value1')
Explanation
IN operator allows us to specify multiple values in WHERE clause and is usually used like following:
WHERE "column_name" IN ("value1", "value2", ..., "valueN");
But in case of checking only single value it is equivalent to:
WHERE "column_name" = "value1";
Theory
  • Operators in The WHERE Clause

    The following operators can be used in the WHERE clause:
    Operator Description
    = Equal
    <> Not equal. Note: In some versions of SQL this operator may be written as !=
    > Greater than
    < Less than
    >= Greater than or equal
    <= Less than or equal
    BETWEEN Between an inclusive range
    LIKE Search for a pattern
    IN To specify multiple possible values for a column
    Read more: SQL WHERE Clause

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з SQL
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести