Skip to content
Advertisement

Choosing the name of a column when creating a view in Redshift

I’m trying to create a view that contains a column with a list of codes. This is the SQL code that I currently have:

This creates a view with this column:

?column?
code1
code2
code3

As you can see the column name is “?column?” and I would like to change it to a name of my choice. I’ve tried looking at the Redshift documentation where it says that you can specify a column name, but I’m not sure what’s the correct syntax since they don’t give any examples.

Advertisement

Answer

just add an alias with the name of column

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement