Adding Multiple Columns in Apache Impala

When you engage with several RDBMSs, even a small amount of change in syntax can cause confusion. This is the second in a series of postings about how to add multiple columns to different RDBMSs. However, this article will focus on Apache Impala syntax.

Syntax:

ALTER TABLE tableName
ADD COLUMNS (`column1` dataType, `column2` dataType, `column3` dataType);

Example:
ALTER TABLE Customers
ADD COLUMNS (`CxID` SMALLINT(6) NOT NULL, `LastName` STRING, `status` INT NOT NULL);

Hope you find this article helpful.

Please subscribe for more interesting updates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s