Files
greptimedb/tests/cases/distributed/alter/drop_col_not_null_next.result
JeremyHi 2ef0d06cdb feat: status_code in response header (#1982)
* feat: status_code in response header

* chore: parese grpc response

* fix: sqlness failed

* chore: fix sqlness
2023-07-19 11:27:49 +00:00

44 lines
711 B
Plaintext

CREATE TABLE test(i BIGINT TIME INDEX, j INTEGER, k INTEGER NOT NULL);
Affected Rows: 0
INSERT INTO test VALUES (1, 1, 11), (2, 2, 12);
Affected Rows: 2
SELECT * FROM test;
+---+---+----+
| i | j | k |
+---+---+----+
| 1 | 1 | 11 |
| 2 | 2 | 12 |
+---+---+----+
ALTER TABLE test DROP COLUMN j;
Affected Rows: 0
INSERT INTO test VALUES (3, NULL);
Error: 1004(InvalidArguments), Failed to insert value to table: greptime.public.test, source: Failed to operate table, source: Column k is not null but input has null
INSERT INTO test VALUES (3, 13);
Affected Rows: 1
SELECT * FROM test;
+---+----+
| i | k |
+---+----+
| 1 | 11 |
| 2 | 12 |
| 3 | 13 |
+---+----+
DROP TABLE test;
Affected Rows: 1