ClickHouse/tests/queries/0_stateless/00975_values_list.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
923 B
MySQL
Raw Normal View History

2019-07-29 16:20:17 +00:00
DROP TABLE IF EXISTS values_list;
SELECT * FROM VALUES('a UInt64, s String', (1, 'one'), (2, 'two'), (3, 'three'));
CREATE TABLE values_list AS VALUES('a UInt64, s String', (1, 'one'), (2, 'two'), (3, 'three'));
SELECT * FROM values_list;
SELECT subtractYears(date, 1), subtractYears(date_time, 1) FROM VALUES('date Date, date_time DateTime', (toDate('2019-01-01'), toDateTime('2019-01-01 00:00:00')));
SELECT * FROM VALUES('s String', ('abra'), ('cadabra'), ('abracadabra'));
2019-07-29 16:23:22 +00:00
SELECT * FROM VALUES('n UInt64, s String, ss String', (1 + 22, '23', toString(23)), (toUInt64('24'), '24', concat('2', '4')));
SELECT * FROM VALUES('a Decimal(4, 4), b String, c String', (divide(toDecimal32(5, 3), 3), 'a', 'b'));
2020-06-24 16:37:04 +00:00
2023-03-03 14:13:07 +00:00
SELECT * FROM VALUES('x Float64', toUInt64(-1)); -- { serverError 69 }
SELECT * FROM VALUES('x Float64', NULL); -- { serverError 53 }
2020-06-24 16:37:04 +00:00
SELECT * FROM VALUES('x Nullable(Float64)', NULL);
2019-07-29 16:23:22 +00:00
DROP TABLE values_list;