1
drop table if exists t1;
2
create table t1 (t1 char(3) primary key);
3
insert into t1 values("ABC");
4
insert into t1 values("ABA");
5
insert into t1 values("AB%");
6
select * from t1 where t1="ABC";
9
select * from t1 where t1="ABCD";
11
select * from t1 where t1 like "a_\%";
14
describe select * from t1 where t1="ABC";
15
id select_type table type possible_keys key key_len ref rows Extra
16
1 SIMPLE t1 const PRIMARY PRIMARY 3 const 1 Using index
17
describe select * from t1 where t1="ABCD";
18
id select_type table type possible_keys key key_len ref rows Extra
19
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables