SQL In Operator

SQL – In Clause :

SQL In Clause is used to pass multiple values in WHERE condtion .

SQL In CLause Syntax :

SELECT ColumnName1, ColumnName2 FROM TableName WHERE ColumnName IN (value1,value2,value3,value4…valueN);

SQL NOT In CLause Syntax :
SQL NOT selectes the results excluding the spcified value .(values in NOT IN clause).

SELECT ColumnName1, ColumnName2 FROM TableName WHERE ColumnName NOT IN (value1,value2,value3,value4…valueN);


Example

Example

SELECT *FROM Users WHERE ID IN (1,5,7);

Will Produce The Follwoing Result.
SQL_IN_CLAUSE


Advertisements

Add Comment

📖 Read More