Subject | Re: AW: [Firebird-Java] How do I use quoted fields? |
---|---|
Author | Marczisovszky Daniel |
Post date | 2002-04-18T19:29:57Z |
MW> what exatly do you mean? do you mean the following?
MW> ResultSet rs = st.executeQuery("select * from \"tblTemp\"");
Actually you're not required to use " at all. You should use only if
the fieldname or the columname is a reserved word, like PASSWORD or
FIRST.
In Java when you want to add a " in your code, you should escape it,
so this:
"\"" is a String, containing ".
If you still want to use ", you should escape those " in the SQL.
Best wishes,
daniel
MW> ResultSet rs = st.executeQuery("select * from \"tblTemp\"");
Actually you're not required to use " at all. You should use only if
the fieldname or the columname is a reserved word, like PASSWORD or
FIRST.
In Java when you want to add a " in your code, you should escape it,
so this:
"\"" is a String, containing ".
If you still want to use ", you should escape those " in the SQL.
Best wishes,
daniel