DROP TABLE IF EXISTS ids;
CREATE TABLE ids (
id VARCHAR(5),
value VARCHAR(10),
KEY (id, value)
) DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
INSERT INTO ids VALUES ("abc", "Abc");
INSERT INTO ids VALUES ("acd", "aBc");
INSERT INTO ids VALUES ("ade", "abC");
INSERT INTO ids VALUES ("aef", "abc");
INSERT INTO ids VALUES ("ABC", "aBC");
INSERT INTO ids VALUES ("ACD", "AbC");
INSERT INTO ids VALUES ("ADE", "ABc");
INSERT INTO ids VALUES ("AEF", "ABC");
SELECT * FROM ids;
id	value
ABC	aBC
ACD	AbC
ADE	ABc
AEF	ABC
abc	Abc
acd	aBc
ade	abC
aef	abc
SELECT * FROM ids WHERE id BETWEEN "ab" AND "ad";
id	value
abc	Abc
ABC	aBC
acd	aBc
ACD	AbC
DROP TABLE ids;
