1

My column names in my table are just numbers from 0-20, where each column is corresponding to a number however, when I try

    select 0 from table

I get output of only zeroes in my column, how can I select a column without changing the column names?

mei
  • 35
  • 8
  • https://docs.aws.amazon.com/redshift/latest/dg/r_names.html#r_names-delimited-identifiers –  Jan 21 '21 at 19:23

2 Answers2

3
select "0" from table
0

Try select [0] from table. Your way is replicating zeros for all entries in the table

Johnny Fitz
  • 532
  • 2
  • 8
  • SQL uses double quotes to escape invalid identifiers. Square brackets are use to reference array elements –  Jan 21 '21 at 19:21