Search code examples
mysqlreserved-words

mysql Select AS


i need to do the following select:

select distinct type as option from pages

but i keep getting errors. Can you help me please?


Solution

  • option is a MySQL reserved word.

    Enclose it in back-ticks or use a different non-reserved-word alias.