26 lines
686 B
Plaintext
26 lines
686 B
Plaintext
CREATE TABLE t1 (
|
|
a int PRIMARY KEY,
|
|
b varchar(255)
|
|
) ENGINE = NDB;
|
|
INSERT INTO t1 VALUES (1, "MySQL Server with NDB");
|
|
INSERT INTO t1 (a, b) VALUES (11, "Barrier effect");
|
|
INSERT INTO t1 (a, b) VALUES
|
|
(12, "The third row"),
|
|
(37, "And of course number 37");
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a b
|
|
1 MySQL Server with NDB
|
|
11 Barrier effect
|
|
12 The third row
|
|
37 And of course number 37
|
|
ALTER TABLE t1 ALGORITHM=INPLACE, ADD COLUMN c INT DEFAULT NULL;
|
|
Warnings:
|
|
Warning 1478 Converted FIXED field 'c' to DYNAMIC to enable online ADD COLUMN
|
|
SELECT * FROM t1 ORDER BY a;
|
|
a b c
|
|
1 MySQL Server with NDB NULL
|
|
11 Barrier effect NULL
|
|
12 The third row NULL
|
|
37 And of course number 37 NULL
|
|
DROP TABLE t1;
|