ClickHouse/tests/queries/0_stateless/00571_alter_nullable.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

14 lines
591 B
SQL

DROP TABLE IF EXISTS nullable_00571;
CREATE TABLE nullable_00571 (x String) ENGINE = MergeTree ORDER BY x;
INSERT INTO nullable_00571 VALUES ('hello'), ('world');
SELECT * FROM nullable_00571;
ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64);
SELECT * FROM nullable_00571;
ALTER TABLE nullable_00571 DROP COLUMN n;
ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64) DEFAULT NULL;
SELECT * FROM nullable_00571;
ALTER TABLE nullable_00571 DROP COLUMN n;
ALTER TABLE nullable_00571 ADD COLUMN n Nullable(UInt64) DEFAULT 0;
SELECT * FROM nullable_00571;
DROP TABLE nullable_00571;