mysql 语句中的in、find_in_set、like的区别
1.in查询相当于多个or条件的叠加,例如:
select * from user where user_id in (1,2,3);
等效于select * from user where user_id = 1 or user_id = 2 or user_id = 3;
not in与in相反,如select * from user where user_id not in (1,2,3);
等效于select * from user where user_id != 1 and user_id
原创
2020-05-19 14:59:00 ·
507 阅读 ·
0 评论