2

If I want to rename a column foo, I can write

SELECT * EXCEPT(foo), foo as bar

But that pushes foo to the end of the column list. Is there a way to do this and preserve order? (NB. the table has many columns, so I'm not looking to list them all.)

Edit: I don't think this is a duplicate. The main answer linked to says

A SELECT * REPLACE statement does not change the names or order of columns.

Mohan
  • 7,302
  • 5
  • 32
  • 55

0 Answers0