mysql 查询 not in not like和in like啥区别啊select * from aaaa where id in(1,2,3);select * from aaaa where id not in(1,2,3);select * from aaaa where tt like "%as%";select * from aaaa where tt not like "%as%";1 3我懂 2 4这个加了not是什

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 11:57:37
mysql 查询 not in not like和in like啥区别啊select * from aaaa where id in(1,2,3);select * from aaaa where id not in(1,2,3);select * from aaaa where tt like
x)˭,.Qx6K2TNfvI=@5uӞ]O;V?U\V E )@:F:ƚTA! %bU%`.5T0~1Y{ɋ3Xk]m@f&H σ~haAP1z5';;?k ~O p63jypmzX_tu!s_f9+Ovlg65PL|

mysql 查询 not in not like和in like啥区别啊select * from aaaa where id in(1,2,3);select * from aaaa where id not in(1,2,3);select * from aaaa where tt like "%as%";select * from aaaa where tt not like "%as%";1 3我懂 2 4这个加了not是什
mysql 查询 not in not like和in like啥区别啊
select * from aaaa where id in(1,2,3);
select * from aaaa where id not in(1,2,3);
select * from aaaa where tt like "%as%";
select * from aaaa where tt not like "%as%";
1 3我懂 2 4这个加了not是什么意思啊

mysql 查询 not in not like和in like啥区别啊select * from aaaa where id in(1,2,3);select * from aaaa where id not in(1,2,3);select * from aaaa where tt like "%as%";select * from aaaa where tt not like "%as%";1 3我懂 2 4这个加了not是什
加了not就是in的补集.
select * from aaaa where id in(1,2,3); --查找id在1,2,3中的数据集
select * from aaaa where id not in(1,2,3); --查找id不在1,2,3中的数据集
select * from aaaa where tt like "%as%"; --查找tt字段中包含as字符的数据集
select * from aaaa where tt not like "%as%"; --查找tt字段中不包含as字符的数据集