Oracle JDBC and Oracle CHAR data type

后端 未结 5 1983
别跟我提以往
别跟我提以往 2020-11-29 12:03

I have a tricky issue with the Oracle JDBC driver\'s handling of CHAR data types. Let\'s take this simple table:



        
5条回答
  •  我在风中等你
    2020-11-29 12:30

    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))")
    

提交回复
热议问题