Add multiple columns using alter command in Exasol DB

633 Views Asked by At

Is it possible to add multiple columns to a table in a single query execution, using alter table in exasol?

example:

Alter table Employee add column phone_number varchar(256), add column address varchar(256)

2

There are 2 best solutions below

0
On

No. According to the documentation it is impossible.

0
On

It is not possible in one command in Exasol, but in Exasol DDL commands do not auto-commit, so you can put them in the same transaction. You could do:

 set autocommit off;
 alter table t1 add column c1 varchar(100);
 alter table t1 add column c2 varchar(100);
 alter table t1 add column c3 varchar(100);
 commit;
 set autocommit on;