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

前端 未结 4 1878
滥情空心
滥情空心 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:10

    DatabaseMetaData.getSQLKeywords() is supposed to return a comma-separated list of reserved words within this database. This list doesn't contain ANSI SQL keywords such as FROM however. I'm not completely sure if this really contains all keywords in all databases however.

    For H2, the list of keywords is documented under Keywords / Reserved Words.

提交回复
热议问题