Search the Blog

Monday, July 15, 2019

SQL NOT IN OPERATOR CODE AND SYNTAX Programming Logic and Code with Syntax

If We want to check multiple static values in condition not exists.
SYNTAX

SELECT col_name
FROM table_name
WHERE column_name NOT IN (value1, value2, ...);


QUERY-
SELECT * FROM Customers
WHERE Country NOT IN ('DELHI''MUMBAI''SHIMLA');'





IN Operator
If We want to check multiple static values in condition.

SYNTAX

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


QUERY-

SELECT * FROM Customers
WHERE Country IN ('DELHI''MUMBAI''SHIMLA');

No comments:

Post a Comment

Translate