1Used alongside a WHERE clause as a shorthand for multiple OR conditions.
2So instead of:
3SELECT * FROM users
4WHERE country = 'USA' OR country = 'United Kingdom' OR
5country = 'Russia' OR country = 'Australia';
6You can use:
7SELECT * FROM users
8WHERE country IN ('USA', 'United Kingdom', 'Russia',
9'Australia');
1SELECT column_name(s)
2FROM table_name
3WHERE column_name IN (value1, value2, ...);
1SQL NOT IN operator is used to filter the result if the values that are mentioned as part of the IN operator is not satisfied. Let’s discuss in detail about SQL NOT IN operator.
2
3Syntax:
4SELECT Column(s) FROM table_name WHERE Column NOT IN (value1, value2... valueN);
1Where clause basically returns only
2true conditions
3
4Select First_Name
5From Customers
6Where ID = 1905Cimbom;
1Mit WHERE filtert man nach Zeilen aus einer Tabelle, die bestimmte Kriterien
2erfüllen. Auf diese Weise kann man die Zeilen auf die Zeilen beschränken,
3an der man interessiert ist. Auf diesen Klausel folgt eine Bedingung, die
4entweder «true» oder «false» zurückgibt.
5
6 SELECT *
7 FROM customer
8 WHERE ID = 10;
9