How To Escape Column Names in HSQLDB RDBMS

By Angsuman Chakraborty, Gaea News Network
Saturday, May 26, 2007

HSQLDBSometimes you need to have database column names with space or other non-standard characters. The standard procedure is to escape them with backtick (`) character. HSQLDB doesn’t accept either backtick or single quote as escape character. Instead you have to use escaped double quotes as shown in the example below:

st.execute("CREATE TABLE sheet (tg_meta_id int identity primary key, tg_meta_batch int, SKU varchar(255), \"Data Source\" varchar(255), \"e-Biz Manager\" varchar(255))");

Actually it accepts double quotes but as it is embedded within a String enclosed in double quotes, you have to escape the double quotes.

Discussion

padmaja
January 27, 2010: 1:05 am

how to write into the excel file using java

I need source code in java

October 18, 2007: 3:28 am

My HSQLDB JUnit tests broke when I introduced a ‘date’ field in my database schema.

Thanks a lot for the tip.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :