Alter View In Apache Hive & Impala

Earlier versions of Hive did not enable us to ALTER the view once it was generated, but this limitation has been removed in the later versions.

Please keep in mind that the syntax below applies not just to SQL but also to Apache Hive and Cloudera’s Impala.

Syntax:
ALTER VIEW view_name AS SELECT…

CREATE VIEW Emp_View 
AS
SELECT * FROM Emp WHERE DeptNo IN(10,20);

ALTER VIEW Emp_View 
AS
SELECT * FROM Emp WHERE DeptNo IN(10,20,30);

Hope you find this article helpful.

Please subscribe to receive notifications on latest updates.

2 comments

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 )

Twitter picture

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

Facebook photo

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

Connecting to %s