How to rename a table in Athena?

Viewed 1721

probably a very trivial question but I'm not sure about this and also don't want to lose the table. How do I rename a table in Athena?

Database name - friends
table name - centralPark
desired table name -centralPerk
1 Answers

you can't!

see the list of unsupported DDL in Athena.

what you can do is to make a new table using select:

CREATE TABLE centralPerk
AS SELECT * FROM centralPark
WITH DATA

and drop the old table:

DROP TABLE IF EXISTS centralPerk
Related