How to find if a column name is a reserved keyword across various databases

前端 未结 4 1928
滥情空心
滥情空心 2021-01-18 14:28

We have a legacy schema file which has the following column names, would like to understand if any of them would cause an issue if we port our application to h2, mysql, post

4条回答
  •  孤城傲影
    2021-01-18 15:16

    Should be quite easy to get the list of reserved words and build a table of the reserved words. Here are some lists of reserved words:

    • Oracle: http://download.oracle.com/docs/cd/B19306_01/em.102/b40103/app_oracle_reserved_words.htm
    • SQL Server:
      http://msdn.microsoft.com/en-us/library/ms189822.aspx
    • PostgreSQL:
      http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
    • MySQL:
      https://dev.mysql.com/doc/refman/5.6/en/keywords.html#keywords-in-current-series

    And here's an online checker: http://www.petefreitag.com/tools/sql_reserved_words_checker/?word=on

提交回复
热议问题