文章目录

  • mysql_帮助命令
    • references
    • 帮助 help 语法:
    • help 文档
      • 官方介绍help用法
      • ? help command
      • 模糊搜索/通配搜索

mysql_帮助命令

references

  • MySQL :: MySQL 8.0 Reference Manual :: 4.5.1.4 mysql Client Server-Side Help

帮助 help 语法:

  • help search_string
  • 其中,help关键字可以简化为 ?或者 \?

help 文档

官方介绍help用法

  • ? help
  • ? help statement

mysql> ? help statement
Name: 'HELP STATEMENT'
Description:
Syntax:
HELP 'search_string'The HELP statement returns online information from the MySQL Reference
Manual. Its proper operation requires that the help tables in the mysql
database be initialized with help topic information (see
https://dev.mysql.com/doc/refman/8.0/en/server-side-help-support.html).The HELP statement searches the help tables for the given search string
and displays the result of the search. The search string is not
case-sensitive.The search string can contain the wildcard characters % and _. These
have the same meaning as for pattern-matching operations performed with
the LIKE operator. For example, HELP 'rep%' returns a list of topics
that begin with rep.URL: https://dev.mysql.com/doc/refman/8.0/en/help.html

? help command

  • ? help command
mysql> ? help command
Name: 'HELP COMMAND'
Description:
Syntax:
mysql> help search_stringIf you provide an argument to the help command, mysql uses it as a
search string to access server-side help from the contents of the MySQL
Reference Manual. The proper operation of this command requires that
the help tables in the mysql database be initialized with help topic
information (see
https://dev.mysql.com/doc/refman/8.0/en/server-side-help-support.html).If there is no match for the search string, the search fails:mysql> help meNothing found
Please try to run 'help contents' for a list of all accessible topicsUse help contents to see a list of the help categories:mysql> 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 ManagementAdministrationData DefinitionData ManipulationData TypesFunctionsFunctions and Modifiers for Use with GROUP BYGeographic FeaturesLanguage StructurePluginsStorage EnginesStored RoutinesTable MaintenanceTransactionsTriggersIf the search string matches multiple items, mysql shows a list of
matching topics:mysql> help logs
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:SHOWSHOW BINARY LOGSSHOW ENGINESHOW LOGSUse a topic as the search string to see the help entry for that topic:mysql> help show binary logs
Name: 'SHOW BINARY LOGS'
Description:
Syntax:
SHOW BINARY LOGS
SHOW MASTER LOGSLists the binary log files on the server. This statement is used as
part of the procedure described in [purge-binary-logs], that shows how
to determine which logs can be purged.mysql> SHOW BINARY LOGS;
+---------------+-----------+-----------+
| Log_name      | File_size | Encrypted |
+---------------+-----------+-----------+
| binlog.000015 |    724935 | Yes       |
| binlog.000016 |    733481 | Yes       |
+---------------+-----------+-----------+The search string can contain the wildcard characters % and _. These
have the same meaning as for pattern-matching operations performed with
the LIKE operator. For example, HELP rep% returns a list of topics that
begin with rep:mysql> HELP rep%
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:REPAIR TABLEREPEAT FUNCTIONREPEAT LOOPREPLACEREPLACE FUNCTIONURL: https://dev.mysql.com/doc/refman/8.0/en/mysql-server-side-help.htmlmysql>

模糊搜索/通配搜索

  • mysql 的帮助命令也是一种查询数据库的行为(文档介绍)
  • mysql 采用类别和主题来组织帮助内容,而使用统配搜索我认为是最高效的
    • 其次就是用搜索引擎在线获取帮助
  • 譬如,我要搜索有关操作符/运算符 operator相关主题的帮助,可以用命令 ? %operator%

    • %表示任意长度的任意字符
    • %operator%可以匹配到任何包含 operator的字符串

mysql> ? %operator%
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:BINARY OPERATORCASE OPERATOR
categories:Cast Functions and OperatorsComparison OperatorsLogical Operators
  • 我们看到返回的结果中包含了 topiccategory(主题和门类)

    • 譬如我们对逻辑运算符 logical operator感兴趣,我们就根据该 category 进一步查询

    • ? logical operators

      
      mysql> ? logical operators
      You asked for help about help category: "Logical Operators"
      For more information, type 'help `<item>`', where `<item>` is one of the following
      topics:
      !
      AND
      ASSIGN-EQUAL
      ASSIGN-VALUE
      OR
      XOR
      • 可以看到,结果返回了 6 个 topic,我们可以进一步查看具体的 topic,例如 help OR;

      • content:

        mysql> \? or
        Name: 'OR'
        Description:
        Syntax:
        OR, ||Logical OR. When both operands are non-NULL, the result is 1 if any
        operand is nonzero, and 0 otherwise. With a NULL operand, the result is
        1 if the other operand is nonzero, and NULL otherwise. If both operands
        are NULL, the result is NULL.URL: https://dev.mysql.com/doc/refman/8.0/en/logical-operators.htmlExamples:
        mysql> SELECT 1 OR 1;
        -> 1
        mysql> SELECT 1 OR 0;
        -> 1
        mysql> SELECT 0 OR 0;
        -> 0
        mysql> SELECT 0 OR NULL;
        -> NULL
        mysql> SELECT 1 OR NULL;
        -> 1
        

mysql_帮助命令/通配搜索/help help用法(official doc)相关推荐

  1. 《SQL必知必会》第六课 用通配符进行过滤 使用LIKE操作符,%、[]、_通配符进行通配搜索

    第六课 用通配符进行过滤 使用LIKE操作符,%.[]._通配符进行通配搜索 #前面使用的所有操作符过滤中使用的值都是已知的 #利用通配符可以创建比较特定数据的搜索模式 #通配符:用来匹配值的一部分的 ...

  2. linux find命令通配,Linux Find 命令的详解与研究

    Find命令用来在指定目录下查找文件.Linux下类似的查找命令还有 which.locate.whereis. 区别: which        查找命令字所在的位置        eg.  whi ...

  3. 文件名重定向到txt中Linux,Linux上glob用于实现文件名的通配、IO重定向及管道

    Linux中所谓的通配是指,显示以指定条件为条件的文件:即通配的含义是指搜寻以已知条件为前提的目标文件. 常用文件通配符有: 文件通配符 含义 例子 * 任意长度的任意字符 如a*,搜寻所有以a为首的 ...

  4. 多域型SSL证书和通配型证书安装指南- iis 6.0 (windows 2003)

    转载:深圳市维瑞电子商务有限公司 http://www.willrey.com/support/MDC_Wildcard_ssl_install.html 对于一般的单域型SSL证书,由于一台物理服务 ...

  5. Hadoop进阶之输入路径如何正则通配?

    2019独角兽企业重金招聘Python工程师标准>>> 在hadoop的编程中,如果你是手写MapReduce来处理一些数据,那么就避免不了输入输出参数路径的设定,hadoop里文件 ...

  6. 服务器搜索文件命令,Centos文件搜索命令的讲解

    1.locate--->文件查找事先生成的数据库,模糊查找,updatedb更新locate数据库 -i:忽略文件名的大小写 -n:只显示前n行eg:locate-n3passwd 2.find ...

  7. glob通配及IO重定向 笔记

    bash的基础特性:         globbing:文件名通配 (整体文件匹配,而非部分)             匹配模式:元字符                 *:匹配任意长度的任意字符   ...

  8. [转载]Word通配字符

    [转载]Word通配字符 本文转自:https://www.cnblogs.com/pugongying123/p/8327674.html Word查找栏代码·通配符一览表 序号 清除使用通配符复选 ...

  9. Linux系统应用:globbing通配及IO重定向

    globbing通配及IO重定向 globbing是什么? IO重定向及管道 globbing是什么? Globbing is the process of using wildcard charac ...

  10. CSS之常用选择器(元素、id、类、通配选择器)

    <!DOCTYPE html> <html><head><meta charset="UTF-8"><title>< ...

最新文章

  1. 用一个比喻说明项目里各个成员的角色
  2. IBM磁带库中更换磁带的步骤
  3. 微信有电脑客户端吗_一台电脑如何开多个微信?你学会了吗?
  4. 数据分析在商业中的作用
  5. 如何启动Django项目详解
  6. 火狐浏览器 Mozilla Firefox v36.0.3 便携增强版
  7. 综述类论文怎么写引言和结语?
  8. 多年来我的创业感悟,穷人与富人的赚钱思维模式丨国仁猫哥
  9. html字体名称有哪些,css有哪些字体系列?
  10. js中var that=this的重要性
  11. Rust交叉编译开发环境的搭建
  12. python源码实例之根据生日预测星座和属相以及属相对应年份(附源码 可供学习)
  13. 零基础搭建私人影音媒体平台【远程访问Jellyfin播放器】
  14. SpringBoot Poi导出word,浏览器下载
  15. 【5G系列】MICO学习总结(2)
  16. 颜色的前世今生21·Lab编码系统
  17. 郊区春游 (状压dp)
  18. 怎么把电脑设为服务器共享文档,共享电脑设置 服务器
  19. arping命令用法
  20. 【答学员问】34岁想转行做it还可以吗?

热门文章

  1. 沪牌软件操作开发说明
  2. MySQL 系列(三)你不知道的 视图、触发器、存储过程、函数、事务、索引、语句
  3. atom 64 linux,英特尔:Android的64位Atom处理器已完工
  4. gmail注册方法_如何在Gmail中释放空间:5种回收空间的方法
  5. S4 HANA 1809 FPS03 Standard装机总结(刘欣2019.11.7)
  6. USRP_X310_Device_Recovery手册
  7. Windows环境下使用UHD PythonAPI开发USRP X310
  8. dtools: error while loading shared libraries: libicui18n.so.55: cannot open shared object file
  9. 梦三国测试服显示连接服务器失败,《梦三国》梦三国服务器未连接攻略
  10. 关于SYS/BIOS