How to deal with SQL column names that look like SQL keywords?

后端 未结 14 1066
温柔的废话
温柔的废话 2020-11-22 13:24

One of my columns is called from. I can\'t change the name because I didn\'t make it. Am I allowed to do something like SELECT from FROM TableName

14条回答
  •  有刺的猬
    2020-11-22 13:53

    In MySQL, alternatively to using back quotes (`), you can use the UI to alter column names. Right click the table > Alter table > Edit the column name that contains sql keyword > Commit.

    select [from] from 

    As a note, the above does not work in MySQL

    提交回复
    热议问题