Problems with escaping table and field names in Derby and Hsqldb

后端 未结 2 1468
眼角桃花
眼角桃花 2021-01-14 00:22

I\'m having a problem with my ORMLite package. When I generate the schema for a table, I thought it would be a good practice to escape all entity names. This would protect

2条回答
  •  生来不讨喜
    2021-01-14 00:56

    You just have to make sure that the case matches.

    So if it's:

    create table "Footable" ("Stuff" varchar (25))

    Then it has to be:

    insert into "Footable" ("Stuff") values 'hi mom'

    If the table/column name is in double quotes, the case is preserved as is.

    If the table/column name is not in double quotes, then Derby handles it insensitive to case.

提交回复
热议问题