DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(mysql.info.gz) Charset-SHOW

Info Catalog (mysql.info.gz) Charset-CAST (mysql.info.gz) Charset-operations
 
 10.4.4 `SHOW' Statements
 ------------------------
 
 Several `SHOW' statements are new or modified in MySQL 4.1 to provide
 additional character set information.  `SHOW CHARACTER SET', `SHOW
 COLLATION', and `SHOW CREATE DATABASE' are new.  `SHOW CREATE TABLE' and
 `SHOW COLUMNS' are modified.
 
 The `SHOW CHARACTER SET' command shows all available character sets.
 It takes an optional `LIKE' clause that indicates which character set
 names to match.  For example:
 
      mysql> SHOW CHARACTER SET LIKE 'latin%';
      +---------+-----------------------------+-------------------+--------+
      | Charset | Description                 | Default collation | Maxlen |
      +---------+-----------------------------+-------------------+--------+
      | latin1  | ISO 8859-1 West European    | latin1_swedish_ci |      1 |
      | latin2  | ISO 8859-2 Central European | latin2_general_ci |      1 |
      | latin5  | ISO 8859-9 Turkish          | latin5_turkish_ci |      1 |
      | latin7  | ISO 8859-13 Baltic          | latin7_general_ci |      1 |
      +---------+-----------------------------+-------------------+--------+
 
  `SHOW CHARACTER SET' SHOW CHARACTER SET.
 
 The output from `SHOW COLLATION' includes all available character sets.
 It takes an optional `LIKE' clause that indicates which collation names
 to match.  For example:
 
      mysql> SHOW COLLATION LIKE 'latin1%';
      +-------------------+---------+----+---------+----------+---------+
      | Collation         | Charset | Id | Default | Compiled | Sortlen |
      +-------------------+---------+----+---------+----------+---------+
      | latin1_german1_ci | latin1  |  5 |         |          |       0 |
      | latin1_swedish_ci | latin1  |  8 | Yes     | Yes      |       0 |
      | latin1_danish_ci  | latin1  | 15 |         |          |       0 |
      | latin1_german2_ci | latin1  | 31 |         | Yes      |       2 |
      | latin1_bin        | latin1  | 47 |         | Yes      |       0 |
      | latin1_general_ci | latin1  | 48 |         |          |       0 |
      | latin1_general_cs | latin1  | 49 |         |          |       0 |
      | latin1_spanish_ci | latin1  | 94 |         |          |       0 |
      +-------------------+---------+----+---------+----------+---------+
 
  `SHOW COLLATION' SHOW COLLATION.
 
 `SHOW CREATE DATABASE' displays the `CREATE DATABASE' statement that
 will create a given database. The result includes all database options.
 `DEFAULT CHARACTER SET' and `COLLATE' are supported. All database
 options are stored in a text file named `db.opt' that can be found in
 the database directory.
 
      mysql> SHOW CREATE DATABASE a\G
      *************************** 1. row ***************************
             Database: a
      Create Database: CREATE DATABASE `a`
                       /*!40100 DEFAULT CHARACTER SET macce */
 
  `SHOW CREATE DATABASE' SHOW CREATE DATABASE.
 
 `SHOW CREATE TABLE' is similar, but displays the `CREATE TABLE'
 statement to create a given table. The column definitions indicate any
 character set specifications, and the table options include character
 set information.
 
  `SHOW CREATE TABLE' SHOW CREATE TABLE.
 
 The `SHOW COLUMNS' statement displays the collations of a table's
 columns when invoked as `SHOW FULL COLUMNS'.  Columns with `CHAR',
 `VARCHAR', or `TEXT' data types have non-`NULL' collations. Numeric and
 other non-character types have `NULL' collations. For example:
 
      mysql> SHOW FULL COLUMNS FROM t;
      +-------+---------+------------+------+-----+---------+-------+
      | Field | Type    | Collation  | Null | Key | Default | Extra |
      +-------+---------+------------+------+-----+---------+-------+
      | a     | char(1) | latin1_bin | YES  |     | NULL    |       |
      | b     | int(11) | NULL       | YES  |     | NULL    |       |
      +-------+---------+------------+------+-----+---------+-------+
 
 The character set is not part of the display. (The character set name
 is implied by the collation name.)
 
  `SHOW COLUMNS' SHOW COLUMNS.
 
Info Catalog (mysql.info.gz) Charset-CAST (mysql.info.gz) Charset-operations
automatically generated byinfo2html