mysql查看帮助

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

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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值