mysql查看帮助

来源:互联网 发布:ubuntu 重装桌面环境 编辑:程序博客网 时间:2024/06/05 10:16

一、如果不知道帮助能够提供些什么,可以一层一层往下看:

mysql> ? contents

You asked for help about help category: "Contents"

For more information, type 'help <item>', where <item> is one of the following

categories:

   Account Management

   Administration

   Compound Statements

   Data Definition

   Data Manipulation

   Data Types

   Functions

   Functions and Modifiers for Use with GROUP BY

   Geographic Features

   Help Metadata

   Language Structure

   Plugins

   Procedures

   Table Maintenance

   Transactions

   User-Defined Functions

   Utility

 

mysql>

 

 

二、查看数据类型

 

 

mysql> ? data types

You asked for help about help category: "Data Types"

For more information, type 'help <item>', where <item> is one of the following

topics:

   AUTO_INCREMENT

   BIGINT

   BINARY

   BIT

   BLOB

   BLOB DATA TYPE

   BOOLEAN

   CHAR

   CHAR BYTE

   DATE

   DATETIME

   DEC

   DECIMAL

   DOUBLE

   DOUBLE PRECISION

   ENUM

   FLOAT

   INT

   INTEGER

   LONGBLOB

   LONGTEXT

   MEDIUMBLOB

   MEDIUMINT

   MEDIUMTEXT

   SET DATA TYPE

   SMALLINT

   TEXT

   TIME

   TIMESTAMP

   TINYBLOB

   TINYINT

   TINYTEXT

   VARBINARY

   VARCHAR

   YEAR DATA TYPE

 

三、查看数据类型

 

mysql> ?INT

    -> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?INT' at line 1

mysql> ? int

Name: 'INT'

Description:

INT[(M)] [UNSIGNED] [ZEROFILL]

 

A normal-size integer. The signed range is -2147483648 to 2147483647.

The unsigned range is 0 to 4294967295.

 

URL: http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html

 

 

四、具体查看帮助

 

mysql> ? show

Name: 'SHOW'

Description:

SHOW has many forms that provide information about databases, tables,

columns, or status information about the server. This section describes

those following:

 

SHOW AUTHORS

SHOW {BINARY | MASTER} LOGS

SHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]

SHOW CHARACTER SET [like_or_where]

SHOW COLLATION [like_or_where]

SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [like_or_where]

SHOW CONTRIBUTORS

SHOW CREATE DATABASE db_name

SHOW CREATE EVENT event_name

SHOW CREATE FUNCTION func_name

 

五、查看创建索引

 

mysql> ? create index

Name: 'CREATE INDEX'

Description:

Syntax:

CREATE [ONLINE|OFFLINE] [UNIQUE|FULLTEXT|SPATIAL] INDEX index_name

    [index_type]

    ON tbl_name (index_col_name,...)

    [index_option] ...

 

index_col_name:

    col_name [(length)] [ASC | DESC]

 

index_type:

    USING {BTREE | HASH}

 

index_option:

    KEY_BLOCK_SIZE [=] value

  | index_type

  | WITH PARSER parser_name

  | COMMENT 'string'

 

CREATE INDEX is mapped to an ALTER TABLE statement to create indexes.

See [HELP ALTER TABLE]. CREATE INDEX cannot be used to create a PRIMARY

KEY; use ALTER TABLE instead. For more information about indexes, see

http://dev.mysql.com/doc/refman/5.5/en/mysql-indexes.html.

 

URL: http://dev.mysql.com/doc/refman/5.5/en/create-index.html

 

 

mysql>

原创粉丝点击