mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
14 lines
578 B
MySQL
14 lines
578 B
MySQL
|
DROP TABLE IF EXISTS test.nullable;
|
||
|
CREATE TABLE test.nullable (x String) ENGINE = MergeTree ORDER BY x;
|
||
|
INSERT INTO test.nullable VALUES ('hello'), ('world');
|
||
|
SELECT * FROM test.nullable;
|
||
|
ALTER TABLE test.nullable ADD COLUMN n Nullable(UInt64);
|
||
|
SELECT * FROM test.nullable;
|
||
|
ALTER TABLE test.nullable DROP COLUMN n;
|
||
|
ALTER TABLE test.nullable ADD COLUMN n Nullable(UInt64) DEFAULT NULL;
|
||
|
SELECT * FROM test.nullable;
|
||
|
ALTER TABLE test.nullable DROP COLUMN n;
|
||
|
ALTER TABLE test.nullable ADD COLUMN n Nullable(UInt64) DEFAULT 0;
|
||
|
SELECT * FROM test.nullable;
|
||
|
DROP TABLE test.nullable;
|