SQL query: Can't order by column called “order”?

后端 未结 7 1751
忘掉有多难
忘掉有多难 2021-01-14 03:27

I am pulling a column in an existing script into my template files, and everything is working great.

The only problem is, that this script has a column called

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-14 04:06

    If you are working with Postgres just use "column_name", e.g:

    SELECT "order" FROM table_name WHERE "order" > 10 ORDER BY "order";
    

提交回复
热议问题