ClickHouse/dbms/tests/queries/0_stateless/00963_startsWith_force_primary_key.sql

7 lines
422 B
MySQL
Raw Normal View History

2019-07-07 15:48:34 +00:00
DROP TABLE IF EXISTS test_startsWith;
CREATE TABLE test_startsWith (a String) Engine = MergeTree PARTITION BY tuple() ORDER BY a;
INSERT INTO test_startsWith (a) values ('a'), ('abcd'), ('bbb'), (''), ('abc');
SELECT count() from test_startsWith where startsWith(a, 'a') settings force_primary_key=1;
SELECT count() from test_startsWith where startsWith(a, 'abc') settings force_primary_key=1;
DROP TABLE test_startsWith;