ClickHouse/dbms/tests/queries/0_stateless/00688_case_without_else.sql
2018-08-22 18:17:40 +03:00

10 lines
205 B
SQL

DROP TABLE IF EXISTS test.test;
CREATE TABLE test.test (a UInt8) ENGINE = Memory;
INSERT INTO test.test VALUES (1), (2), (1), (3);
SELECT CASE WHEN a=1 THEN 0 END FROM test.test;
DROP TABLE test.test;