1. 下面哪些语句会使用到索引,哪些索引起了作用?
```
CREATE TABLE t1 (
id int unsigned NOT NULL auto_increment,
a int unsigned NOT NULL DEFAULT 0,
b int unsigned NOT NULL DEFAULT 0,
c int unsigned NOT NULL DEFAULT 0,
PRIMARY KEY(id),
KEY abc (a, b, c) USING BTREE
);
(1). SELECT * FROM t1 WHERE a=3 AND b=5 AND c=4;
(2). SELECT * FROM t1 WHERE c=4 AND b=6 AND a=3;
(3). SELECT * FROM t1 WHERE a=3 AND c=7;
(4). SELECT * FROM t1 WHERE a=3 AND b>7 AND c=3;
(5). SELECT * FROM t1 WHERE b=3 AND c=4;
(6). SELECT * FROM t1 WHERE a>4 AND b=7 AND c=9;
(7). SELECT * FROM t1 WHERE a=3 ORDER BY b;
(8). SELECT * FROM t1 WHERE a=3 ORDER BY c;
(9). SELECT * FROM t1 WHERE b=3 ORDER BY a;
```
#### 题目的详细讲解,欢迎关注 <font color=red size=5> Go后端干货</font>
#### Go,后端等技术干货分享,欢迎一起交流学习
![WechatIMG99.png](https://static.studygolang.com/190508/d20b3d9f2790729effb6cbea985e443d.png)
更多评论
<a href="/user/deletelazy" title="@deletelazy">@deletelazy</a> 在本站推广的,必须是 Go 相关,而且不允许明显就是推广的;顺带的我觉得完全没问题。
什么叫明显的,就是:扔一半内容,然后就让扫码关注看全文
#3