What is the java.sql.Types equivalent for the MySQL TEXT?

Viewed 22248

When using PreparedStatement's setObject method for a column of type TEXT (in a MySQL DB), what should the last parameter be?

For example, I know that this is ok for a VARCHAR column:

stmt.setObject(i, "bla", Types.VARCHAR);

where stmt is a PreparedStatement, and Types is java.sql.Types.

But if the DB column's type is TEXT, should I still use VARCHAR? or maybe BLOB, or CLOB?

3 Answers
Related