Can we add column to an existing table in AWS Athena using SQL query?

0

I have a table in AWS Athena which contains 2 records. Is there a SQL query using which a new column can be inserted in to the table?

質問済み 5年前2162ビュー
1回答
0
承認された回答

You can find more information about adding columns to table in Athena documentation

Or you can use CTAS

For example, you have a table with

CREATE EXTERNAL TABLE sample_test(
id string)
LOCATION
's3://bucket/path'
and you can create another table from sample_test with the query

CREATE TABLE new_test
AS
SELECT *, 'new' AS new_col FROM sample_test
You can use any available query after AS

回答済み 5年前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ