Different database servers use different ways to quote and escape identifiers.
E.g. \"foo bar\" vs `foo bar` vs [foo bar], or \"10\"\"\" vs \"10\\\"\", or identifier
Have a look at
DatabaseMetaData.getIdentifierQuoteString()
I never used it but it sounds good :-)
getExtraNameCharacters() could also be of some help
getExtraNameCharacters()