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?

preguntada hace 5 años2162 visualizaciones
1 Respuesta
0
Respuesta aceptada

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

respondido hace 5 años
profile picture
EXPERTO
revisado hace un mes

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas