ClickHouse/dbms/tests/queries/0_stateless/00665_alter_nullable_string_to_nullable_uint8.sql

13 lines
468 B
MySQL
Raw Normal View History

2018-07-14 23:45:51 +00:00
DROP TABLE IF EXISTS test.alter;
CREATE TABLE test.alter (`boolean_false` Nullable(String)) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO test.alter (`boolean_false`) VALUES (NULL), (''), ('123');
SELECT * FROM test.alter;
SELECT * FROM test.alter ORDER BY boolean_false NULLS LAST;
ALTER TABLE test.alter MODIFY COLUMN `boolean_false` Nullable(UInt8);
SELECT * FROM test.alter;
SELECT * FROM test.alter ORDER BY boolean_false NULLS LAST;
DROP TABLE test.alter;