mysql中 where in

SQL 语句中In 和 Where 的含义不同。
应用解释如下:

1、如需有条件地从表中选取、删除、更新数据时,使用Where;
2、In只作为Where条件子句下的一个运算符,除了In之外还有Between、Like、=、>、>=、<、<=等运算符。
下面举例说明:
1、查询名字为A和B的学生,则语句为
Select * from student where name in('A','B');

猜你喜欢

转载自blog.csdn.net/qq_35071164/article/details/85386069