Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java 6 - Mapping java.sql.Types to Java types

Tags:

java

types

sql

jdbc

I'm looking for a link to a table with the mappings between SQL types (java.sql.Types) to Java types.

Do you know where I can find one ?

like image 247
Stephan Avatar asked Aug 05 '11 15:08

Stephan


1 Answers

The JDBC 4.x Specification, provided by JSR 221, provides this info in appendix B titled Data Type Conversion Tables.

See tables containing mappings from Java object types to JDBC types. Different tables exist for the mappings that will be performed when different methods of the JDBC API are invoked; for instance, a separate mapping exists for CallableStatement.getObject and ResultSet.getObject while another exists for the mappings used during ResultSet.getXXX methods.

Click through that JSR 221 page to download a PDF of the spec document, currently JDBC 4.3.

like image 176
Vineet Reynolds Avatar answered Sep 25 '22 15:09

Vineet Reynolds