in operator in SQL

in operator in SQL

The IN operator can be used to specify the multiple values in a WHERE clause.

Syntax

SELECT column_names
FROM table_name
WHERE column_name IN (value1, value2, …..);

or

SELECT column_name(s)
FROM table_name
WHERE column_name IN (SELECT STATEMENT);

Use of IN Operator in SQL Query

Example of Query

SELECT * FROM students
WHERE class NOT IN (‘BSCS’, ‘BSIT’);

in operator in sql

Excercise: Download the Database of in operator in SQL and practice it on your XAMPP phpMyAdmin.

Prof.Fazal Rehman Shamil (Available for Professional Discussions)
1. Message on Facebook page for discussions,
2. Video lectures on Youtube
3. Email is only for Advertisement/business enquiries.