SQL - IN operator

A, IN operator basic usage

IN operator for a predetermined plurality of values ​​in the WHERE clause.

Syntax is as follows:

SELECT 1 column names, column names, table 2 the FROM ... WHERE column name IN (value 1, value 2, ...);

Example student table:

example:

SELECT * FROM student WHERE student_number IN(20190100,20190103);

operation result:

Of course, you can use the NOT keyword to find the data in the value is not specified:

SELECT * FROM student WHERE student_number NOT IN(20190100,20190103);

operation result:

 

Guess you like

Origin www.cnblogs.com/mingmingming/p/11331625.html