Connection Character Sets And Collations - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

This time we have a column with a
might seem natural, the default collation is not taken from the table level. Instead, because the
default collation for
latin1_swedish_ci
Example 3: Table and Column Definition
CREATE TABLE t1
(
c1 CHAR(10)
) DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci;
We have a column with a default character set and a default collation. In this circumstance, MySQL
checks the table level to determine the column character set and collation. Consequently, the character
set for column
Example 4: Database, Table, and Column Definition
CREATE DATABASE d1
DEFAULT CHARACTER SET latin2 COLLATE latin2_czech_ci;
USE d1;
CREATE TABLE t1
(
c1 CHAR(10)
);
We create a column without specifying its character set and collation. We're also not specifying a
character set and a collation at the table level. In this circumstance, MySQL checks the database
level to determine the table settings, which thereafter become the column settings.) Consequently, the
character set for column
10.1.3.8. Compatibility with Other DBMSs
For MaxDB compatibility these two statements are the same:
CREATE TABLE t1 (f1 CHAR(N) UNICODE);
CREATE TABLE t1 (f1 CHAR(N) CHARACTER SET ucs2);

10.1.4. Connection Character Sets and Collations

Several character set and collation system variables relate to a client's interaction with the server.
Some of these have been mentioned in earlier sections:
• The server character set and collation are the values of the
collation_server
• The character set and collation of the default database are the values of the
character_set_database
Additional character set and collation system variables are involved in handling traffic for the
connection between a client and the server. Every client has connection-related character set and
collation system variables.
A "connection" is what you make when you connect to the server. The client sends SQL statements,
such as queries, over the connection to the server. The server sends responses, such as result sets or
error messages, over the connection back to the client. This leads to several questions about character
set and collation handling for client connections, each of which can be answered in terms of system
variables:
• What character set is the statement in when it leaves the client?
The server takes the
which statements are sent by the client.
Connection Character Sets and Collations
latin1
is always latin1_swedish_ci, column
latin1
(not latin1_danish_ci).
is
and its collation is latin1_danish_ci.
c1
latin1
is
c1
latin2
[444]
system variables.
[442]
character_set_client
character set and a default collation. Although it
and its collation is latin2_czech_ci.
and
collation_database
[441]
system variable to be the character set in
776
has a collation of
c1
character_set_server
[444]
system variables.
[443]
and

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents