使用MySQL帮助
来源:互联网 发布:sql语句 数据类型 编辑:程序博客网 时间:2024/06/07 23:23
在实际工作中可能会涉及到不同的数据库,就是使用相同的数据库,可能也会涉及到不同版本,那么在这样的情况下有些命令或者语法可能就会因为不同的版本产生变化,所以为了方便查询不同版本下面的命令或者语法,MySQL产品专门提供了各自的帮助文档。
首先使用? contents
查看MySQL提供帮助分类:
mysql> ? contents;You asked for help about help category: "Contents"For more information, type 'help <item>', where <item> is one of the followingcategories: 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 Storage Engines Table Maintenance Transactions User-Defined Functions Utility
以上命令列出了一个列表,其中一项为Data Types,假设要看一下提供的数据类型又包含哪些:
mysql> ? Data Types;You asked for help about help category: "Data Types"For more information, type 'help <item>', where <item> is one of the followingtopics: 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
数据类型列表出来了,那再看看具体的数据类型是啥情况,比如看看BIGINT:
mysql> ? BIGINT;Name: 'BIGINT'Description:BIGINT[(M)] [UNSIGNED] [ZEROFILL]A large integer. The signed range is -9223372036854775808 to9223372036854775807. The unsigned range is 0 to 18446744073709551615.SERIAL is an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.URL: http://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
这里看到了BIGINT的有符号时候的范围与无符号时候的范围,最后还给了个官方网站的链接。
再看看关于账号管理有啥内容:
mysql> ? Account ManagementYou asked for help about help category: "Account Management"For more information, type 'help <item>', where <item> is one of the followingtopics: ALTER USER CREATE USER DROP USER GRANT RENAME USER REVOKE SET PASSWORD
看一下Insert咋用:
? insertName: 'INSERT'Description:Syntax:INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_name,...)] [(col_name,...)] {VALUES | VALUE} ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ]Or:INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_name,...)] SET col_name={expr | DEFAULT}, ... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ]Or:INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [PARTITION (partition_name,...)] [(col_name,...)] SELECT ... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ]INSERT inserts new rows into an existing table. The INSERT ... VALUESand INSERT ... SET forms of the statement insert rows based onexplicitly specified values. The INSERT ... SELECT form inserts rowsselected from another table or tables. INSERT ... SELECT is discussedfurther in [HELP INSERT SELECT].When inserting into a partitioned table, you can control whichpartitions and subpartitions accept new rows. The PARTITION optiontakes a comma-separated list of the names of one or more partitions orsubpartitions (or both) of the table. If any of the rows to be insertedby a given INSERT statement do not match one of the partitions listed,the INSERT statement fails with the error Found a row not matching thegiven partition set. Seehttp://dev.mysql.com/doc/refman/5.7/en/partitioning-selection.html, formore information and examples.In MySQL 5.7, the DELAYED keyword is accepted but ignored by theserver. See [HELP INSERT DELAYED], for the reasons for this.URL: http://dev.mysql.com/doc/refman/5.7/en/insert.html
看看Show命令能查看些什么内容:
mysql> ? showName: 'SHOW'Description:SHOW has many forms that provide information about databases, tables,columns, or status information about the server. This section describesthose following:SHOW {BINARY | MASTER} LOGSSHOW 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 CREATE DATABASE db_nameSHOW CREATE EVENT event_nameSHOW CREATE FUNCTION func_nameSHOW CREATE PROCEDURE proc_nameSHOW CREATE TABLE tbl_nameSHOW CREATE TRIGGER trigger_nameSHOW CREATE VIEW view_nameSHOW DATABASES [like_or_where]SHOW ENGINE engine_name {STATUS | MUTEX}SHOW [STORAGE] ENGINESSHOW ERRORS [LIMIT [offset,] row_count]SHOW EVENTSSHOW FUNCTION CODE func_nameSHOW FUNCTION STATUS [like_or_where]SHOW GRANTS FOR userSHOW INDEX FROM tbl_name [FROM db_name]SHOW MASTER STATUSSHOW OPEN TABLES [FROM db_name] [like_or_where]SHOW PLUGINSSHOW PROCEDURE CODE proc_nameSHOW PROCEDURE STATUS [like_or_where]SHOW PRIVILEGESSHOW [FULL] PROCESSLISTSHOW PROFILE [types] [FOR QUERY n] [OFFSET n] [LIMIT n]SHOW PROFILESSHOW RELAYLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]SHOW SLAVE HOSTSSHOW SLAVE STATUS [NONBLOCKING]SHOW [GLOBAL | SESSION] STATUS [like_or_where]SHOW TABLE STATUS [FROM db_name] [like_or_where]SHOW [FULL] TABLES [FROM db_name] [like_or_where]SHOW TRIGGERS [FROM db_name] [like_or_where]SHOW [GLOBAL | SESSION] VARIABLES [like_or_where]SHOW WARNINGS [LIMIT [offset,] row_count]like_or_where: LIKE 'pattern' | WHERE exprIf the syntax for a given SHOW statement includes a LIKE 'pattern'part, 'pattern' is a string that can contain the SQL % and _ wildcardcharacters. The pattern is useful for restricting statement output tomatching values.Several SHOW statements also accept a WHERE clause that provides moreflexibility in specifying which rows to display. Seehttp://dev.mysql.com/doc/refman/5.7/en/extended-show.html.URL: http://dev.mysql.com/doc/refman/5.7/en/show.html
总之这么做就是为了更方便去查询对应版本的语法。
阅读全文
0 0
- mysql使用帮助
- mysql 帮助文档使用
- mysql帮助的使用
- mysql帮助的使用
- MySQL帮助的使用
- Mysql如何使用帮助
- 使用MySQL帮助
- Mysql帮助的使用
- mysql之帮助使用
- 在MySQL中使用帮助
- Mysql 命令行模式 学会使用帮助文档
- 使用navicat工具 , 帮助查看mysql日志
- mysql 学习之一 帮助的使用
- 关于 MYSQL 命令行中 帮助的使用
- MySQL基础之高效使用帮助信息
- mysql帮助
- mysql -? MySQL帮助信息
- 使用帮助
- HYSBZ
- About android mk parameters
- 进程与线程
- 串口热插拔的实现
- 对动态网页进行逆向工程
- 使用MySQL帮助
- 机器学习的分类
- 互联网创业网站决定成败
- SQL Server 触发器
- 网络编程常用函数
- cocos ScrollView(滚动容器)加载大量item导致的卡顿问题解决方案
- ubuntu alt tab 无法切换应用程序
- 【UGUI】一键排版对齐
- java进行opc连接之四 java jeasyOPC 连接