How to use sql reserve keyword in column name

saun4frsh picture saun4frsh · Oct 2, 2013 · Viewed 8.5k times · Source

How to use an SQL reserved keyword like the column name "desc" in a select statement?

select "desc" from tablename

Answer

juergen d picture juergen d · Oct 2, 2013

Use brackets

select [desc] from tablename