C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
Basic MySQL User Utility Commands (MySQL 4.0)
 
Basic MySQL User Utility Commands
=================================

`USE' Syntax
------------

     USE db_name

 statement
is issued:

     mysql> USE db1;
     mysql> SELECT COUNT(*) FROM mytable;      # selects from db1.mytable
     mysql> USE db2;
     mysql> SELECT COUNT(*) FROM mytable;      # selects from db2.mytable

 database
and the `editor' table from the `db2' database:

     mysql> USE db1;
     mysql> SELECT author_name,editor_name FROM author,db2.editor
         ->        WHERE author.editor_id = db2.editor.editor_id;

The `USE' statement is provided for Sybase compatibility.

`DESCRIBE' Syntax (Get Information About Columns)
-------------------------------------------------

     {DESCRIBE | DESC} tbl_name [col_name | wild]

`DESCRIBE' is a shortcut for `SHOW COLUMNS FROM'.  *Note Show database
info::.

`DESCRIBE' provides information about a table's columns.  `col_name'
may be a column name or a string containing the SQL `%' and `_'
wildcard characters to obtain output only for the columns with names
matching the string. There is no need to enclose the string in quotes.

If the column types are different from what you expect them to be based
on a `CREATE TABLE' statement, note that MySQL sometimes changes column
types.  *Note Silent column changes::.

This statement is provided for Oracle compatibility.

The `SHOW' statement provides similar information.  *Note `SHOW': SHOW.

[Назад] [Содержание] [Вперед]

Главная