mysql中获取帮助

1、当连接到mysql数据库以后,使用help命令或者\?表示获取帮助信息:

MariaDB [ren]> help

General information about MariaDB can be found at
http://mariadb.org List of all MySQL commands:
Note that all text commands must be first on line and end with ';'
? (\?) Synonym for `help'.
clear (\c) Clear the current input statement.
connect (\r) Reconnect to the server. Optional arguments are db and host.
delimiter (\d) Set statement delimiter.
edit (\e) Edit command with $EDITOR.
ego (\G) Send command to mysql server, display result vertically.
exit (\q) Exit mysql. Same as quit.
go (\g) Send command to mysql server.
help (\h) Display this help.
nopager (\n) Disable pager, print to stdout.
notee (\t) Don't write into outfile.
pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.
print (\p) Print current command.
prompt (\R) Change your mysql prompt.
quit (\q) Quit mysql.
rehash (\#) Rebuild completion hash.
source (\.) Execute an SQL script file. Takes a file name as an argument.
status (\s) Get status information from the server.
system (\!) Execute a system shell command.
tee (\T) Set outfile [to_outfile]. Append everything into given outfile.
use (\u) Use another database. Takes database name as argument.
charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement. For server side help, type 'help contents'

2、指定关键字查看具体命令对应的帮助信息:

MariaDB [ren]> help create
Many help items for your request exist.
To make a more specific request, please type 'help <item>',
where <item> is one of the following
topics:
CREATE DATABASE
CREATE EVENT
CREATE FUNCTION
CREATE FUNCTION UDF
CREATE INDEX
CREATE PROCEDURE
CREATE SERVER
CREATE TABLE
CREATE TABLESPACE
CREATE TRIGGER
CREATE USER
CREATE VIEW
SHOW
SHOW CREATE DATABASE
SHOW CREATE EVENT
SHOW CREATE FUNCTION
SHOW CREATE PROCEDURE
SHOW CREATE TABLE
SPATIAL

3、上面列出了与“create”关键字相关的命令,同样,把列出的命令再次使用help查看即可获得对应命令的语法:

MariaDB [ren]> help create database
Name: 'CREATE DATABASE'
Description:
Syntax:
CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name
[create_specification] ... create_specification:
[DEFAULT] CHARACTER SET [=] charset_name
| [DEFAULT] COLLATE [=] collation_name CREATE DATABASE creates a database with the given name. To use this
statement, you need the CREATE privilege for the database. CREATE
SCHEMA is a synonym for CREATE DATABASE. URL: https://mariadb.com/kb/en/create-database/

4、可以通过help contents命令查看mysql将帮助分为了哪几类:

MariaDB [ren]> help 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

5、查看数据类型的帮助信息:

MariaDB [ren]> help '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

最新文章

  1. Java常见问题
  2. [Eclipse] eclipse中打开xml文件,使用ctrl+鼠标左键无法跳转至Java源文件【待解决】
  3. 在Ubuntu Server下搭建LAMP环境学习记录
  4. vector与set区别(基础知识)
  5. [转]如何:在设备上安装 SQL Server Compact 3.5
  6. html初学(三)
  7. 代码分享:php对二维数组进行排序
  8. VS2012 professional和VS2012 Ultimate的区别
  9. POJ 1258 Agri-Net (最小生成树)
  10. 【原创】车载实时路况信息接收终端移植于Smart210开发板 --- 综合教程
  11. Android得知Scroller(两)——ViewGroup转让scrollTo()
  12. 跟我一起学extjs5(19--模块记录的拖放删除、拖放复制新增)
  13. VSTO学习笔记(一)VSTO概述
  14. mysql中exists、not exists的用法
  15. MacOS 的预览 Preview 打开pdf 容易卡死 解决方案
  16. Unity TimeLine 资源结构
  17. vue.js鼠标经过和离开事件 mouseover mouseout
  18. PHP正则表达式修饰符的种类及介绍
  19. java List 根据属性排序
  20. Django框架----ORM数据库操作注意事项

热门文章

  1. ES9的新特性:异步遍历Async iteration
  2. 前端面试回顾(1)---javascript的面向对象
  3. NumPy之:数据类型
  4. Digit Counting UVA - 1225
  5. JAVAEE_Servlet_04_在service()方法中连接数据库获取表信息
  6. 【JVM】JVM中的垃圾回收算法
  7. 从苏宁电器到卡巴斯基第13篇:我在苏宁电器当营业员 V
  8. hdu2604 矩阵快速幂
  9. YII框架的自定义布局(嵌套式布局,版本是1.1.20)
  10. Portswigger web security academy:Reflected XSS