How To Escape Column Names in HSQLDB RDBMS Come per sfuggire alla colonna di nomi in HSQLDB RDBMS
Sometimes you need to have database column names with space or other non-standard characters. A volte è necessario disporre di dati nomi di colonna con spazio o di altri caratteri non standard. The standard procedure is to escape them with backtick (`) character. La procedura standard è fuggire con backtick ( `) caratteri. HSQLDB doesn’t accept either backtick or single quote as escape character. HSQLDB non accetta neppure backtick sola offerta o come carattere di escape. Instead you have to use escaped double quotes as shown in the example below: Invece è necessario utilizzare le virgolette doppie escape come mostrato nell'esempio qui sotto:
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))"); st.execute ( "CREATE TABLE foglio (int tg_meta_id identità chiave primaria, 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. Effettivamente accetta virgolette, ma poiché è incorporato all'interno di una stringa racchiusa tra virgolette doppie, dovete sfuggire alla virgolette.
Filed under Elencato sotto Database Banca dati , HSQLDB , Headline News Headline News , How To Come , J2EE , Java Software Software Java , Open Source Software Software open source , Programming Programmazione , RDBMS , Tech Note Nota tech | |
| |
RSS 2.0 RSS 2,0 | |
Trackback this Article | questo articolo |
Email this Article Invia questo articolo
You may also like to read Si può anche leggere come |





































October 18th, 2007 at 3:28 am 18 ottobre 2007 alle 3:28 am
My HSQLDB JUnit tests broke when I introduced a ‘date’ field in my database schema. HSQLDB mio JUnit test rotto quando ho introdotto una 'data' in campo il mio schema di database.
Thanks a lot for the tip. Grazie tante per la punta.