And Or IN Not operator

And then the sql than or operator to a higher priority, for example, 1 Or Condition 2 Condition 3 Condition And if the first execution or, 1or2 is then and3

But the fact is 2and3 again or 1, so if you want to 1or2 again and 3 will add 1 or 2 brackets (1 or 2) and 3 on it.

IN operator is used to specify the range of conditions select username from user where id in (1,2,3) This is represented by id can match each username 1,2,3.

or and in operator can accomplish the same task, the open parenthesis is divided into three or like, select username from user where id = 1 or id = 2 or id = 3;

negative condition is not followed, for example

select username from user where id not in (1,2,3); id will not find 1,2,3 username, it would not negate the conditions behind.

negative condition is not followed, for example
[Not shi zai gene fǒuding Houmian de tiaojian, bǐru Shuo]
negative condition is not followed, for example

Guess you like

Origin www.cnblogs.com/cold-windy/p/11785538.html