My 2 Cents List Operator

Swati Mishra

Content Writer
IN and NOT in comes in the list operators. The IN operator that allows the selection of values that match any one of the values in the list. Same way the NOT IN operator restricts the selection of values that match any one values in the list.
Syntax

SELECT column_list
FROM table_name
WHERE expression list_operators (‘value_list’)
 

Manish Mishra

Content Writer
The list operator will search for the data you have queried to retrieve by using IN and NOT operator. This can either includes set of data you want or it excludes what should not be retrieved as the data queried by you from the database.
 

Swati Mishra

Content Writer
if you have to select some data by using IN operator then use like that
example

SELECT student_name, roll_no
FROM student
WHERE class IN ('1', '2')

above example will display the student name and roll no who read in class 1 or class 2
 
Top