Search code examples
sqlprestoamazon-athena

Escape Greater Than for Column Name in Athena


I would like to name the output of my columns with "<" greater or less than symbols.

Select worker_name as '<<Worker>>'
from employ

But I am getting

 mismatched input ''<<Worker>>''. Expecting: <identifier>

I have tried escaping with "`" and "ESCAPE" but no luck. Is there and way to do this?


Solution

  • Using Double Quotes instead of Single Quotes seems to be the correct way

    Select worker_name as "<<Worker>>"
    from employ