Raymond Raymond / Code Snippets & Tips

Hive - Rename Table

event 2021-09-10 visibility 529 comment 0 insights toc
more_vert
insights Stats
toc Table of contents

Hive supports renaming tables with/without moving data folder. For a managed table that is created without LOCATION clause, the command will also move the table's HDFS location.

Code snippet

You can use the following code snippet to rename tables. 

ALTER TABLE table_name RENAME TO new_table_name;
More from Kontext
comment Comments
No comments yet.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts