SQL IN

SQL IN keyword used along with WHERE clause to retrieve results based on a set of discrete values.

Syntax:

SELECT Columns
FROM Tables
WHERE column_name IN ( value1, value2, ... )

Sample:

SELECT Column1
FROM table_name
WHERE column_name IN ( 10, 20, 35, 54)

SELECT *
FROM table_name
WHERE column_name IN ( ‘One’, ‘Three’, ‘Five’)

26 views

Return to top