I have a tricky issue with the Oracle JDBC driver\'s handling of CHAR data types. Let\'s take this simple table:
CHAR
If you want
stmt.setString(1, "a"); // This won't return any records
to return a record, try
conn.prepareStatement("select * from x where c = cast(? as char(4))")