2001-09-27 23:05:54 -06:00
|
|
|
drop table if exists t1;
|
|
|
|
create table t1 (a varchar(10), key(a));
|
|
|
|
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
|
|
|
|
select * from t1 where a like "abc%";
|
2000-12-28 03:56:38 +02:00
|
|
|
a
|
|
|
|
abc
|
|
|
|
abcd
|
2001-09-27 23:05:54 -06:00
|
|
|
select * from t1 where a like "ABC%";
|
2000-12-28 03:56:38 +02:00
|
|
|
a
|
2001-09-14 02:54:33 +03:00
|
|
|
abc
|
|
|
|
abcd
|
2001-09-27 23:05:54 -06:00
|
|
|
select * from t1 where a like "test%";
|
2001-09-14 02:54:33 +03:00
|
|
|
a
|
2000-12-28 03:56:38 +02:00
|
|
|
test
|
2001-09-27 23:05:54 -06:00
|
|
|
select * from t1 where a like "te_t";
|
2000-12-28 03:56:38 +02:00
|
|
|
a
|
|
|
|
test
|
2002-05-17 16:45:00 +03:00
|
|
|
select * from t1 where a like "%a%";
|
|
|
|
a
|
|
|
|
a
|
|
|
|
abc
|
|
|
|
abcd
|
|
|
|
select * from t1 where a like "%abcd%";
|
|
|
|
a
|
|
|
|
abcd
|
|
|
|
select * from t1 where a like "%abc\d%";
|
|
|
|
a
|
|
|
|
abcd
|
2001-09-27 23:05:54 -06:00
|
|
|
drop table t1;
|