Oracle 5.0 Reference Manual page 2098

Table of Contents

Advertisement

MySQL Type Name
DATE
DATETIME
TIMESTAMP[(M)]
TIME
YEAR[(2|4)]
CHAR(M)
VARCHAR(M)
[BINARY]
BINARY(M)
VARBINARY(M)
TINYBLOB
TINYTEXT
BLOB
TEXT
MEDIUMBLOB
MEDIUMTEXT
LONGBLOB
LONGTEXT
ENUM('value1','value2',...)
SET('value1','value2',...)
20.3.5.4. Using Character Sets and Unicode
All strings sent from the JDBC driver to the server are converted automatically from
native Java Unicode form to the client character encoding, including all queries sent using
Statement.execute(), Statement.executeUpdate(),
as all
PreparedStatement
set using setBytes(), setBinaryStream(), setAsciiStream(),
setBlob().
Number of Encodings Per Connection
In MySQL Server 4.1 and higher, Connector/J supports a single character encoding between client
and server, and any number of character encodings for data returned by the server to the client in
ResultSets.
Prior to MySQL Server 4.1, Connector/J supported a single character encoding per connection, which
could either be automatically detected from the server configuration, or could be configured by the user
through the
Setting the Character Encoding
The character encoding between client and server is automatically detected upon connection. You
specify the encoding on the server using the
Connector/J (JDBC) Reference
Return value of
GetColumnClassName
DATE
DATETIME
TIMESTAMP
TIME
YEAR
CHAR
VARCHAR
BINARY
VARBINARY
TINYBLOB
VARCHAR
BLOB
VARCHAR
MEDIUMBLOB
VARCHAR
LONGBLOB
VARCHAR
CHAR
CHAR
and
CallableStatement
and
useUnicode
characterEncoding
Returned as Java Class
java.sql.Date
java.sql.Timestamp
java.sql.Timestamp
java.sql.Time
If
yearIsDateType
is set to false, then the returned object type
is java.sql.Short. If set to
default), then the returned object is of type
java.sql.Date
at midnight.
java.lang.String
the column is BINARY, then
java.lang.String
the column is BINARY, then
byte[]
byte[]
byte[]
java.lang.String
byte[]
java.lang.String
byte[]
java.lang.String
byte[]
java.lang.String
java.lang.String
java.lang.String
Statement.executeQuery()
parameters with the exclusion of parameters
properties.
character_set_server
2078
configuration property
(the
true
with the date set to January 1st,
(unless the character set for
is returned.
byte[]
(unless the character set for
is returned.
byte[]
setUnicodeStream()
[443]
for server versions 4.1.0
as well
and

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents