java resultset.getstring(“col_name”) query
问题 I have a simple query regarding ResultSet.getString() method in java for JDBC. Suppose the value in the Database column is having a \ which is javas escape character e.g. \n or \t etc. When i retrieve the value as getString() i see one more escape character is getting added and the actual meaning of this \n is now a string literal only. So i had to unescape java and then use it properly. String s= rs.getString("col_name"); When s contains `\n': System.out.println(s) output: \n After