SQL问题记录 发表于 2016-05-06 更新于 2020-01-04 分类于 Database 阅读次数: 本文字数: 299 阅读时长 ≈ 1 分钟 SQL问题记录 SQL 问题记录in 和 or测试 sql in 或 or 在参数只有 4 个时 使用了索引,超过 4 个使用全表扫描 1select * from t_goods_feature where category_id in (1,2,3,4,5,6,7,8) 12select * from t_goods_feature where category_id =1 or category_id=2 or category_id =3 or category_id =4or category_id =5 or category_id =6 or category_id =7 or category_id =8