Rechercher dans le manuel MySQL
13.8.3 HELP 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
Section 5.1.14, “Server-Side Help Support”).
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
.
The HELP statement understands several types of search strings:
At the most general level, use
contents
to retrieve a list of the top-level help categories:- HELP 'contents'
For a list of topics in a given help category, such as
Data Types
, use the category name:- HELP 'data types'
For help on a specific help topic, such as the
ASCII()
function or theCREATE TABLE
statement, use the associated keyword or keywords:
In other words, the search string matches a category, many topics,
or a single topic. You cannot necessarily tell in advance whether
a given search string will return a list of items or the help
information for a single help topic. However, you can tell what
kind of response HELP
returned by
examining the number of rows and columns in the result set.
The following descriptions indicate the forms that the result set
can take. Output for the example statements is shown using the
familiar “tabular” or “vertical” format
that you see when using the mysql client, but
note that mysql itself reformats
HELP
result sets in a different
way.
Empty result set
No match could be found for the search string.
Result set containing a single row with three columns
This means that the search string yielded a hit for the help topic. The result has three columns:
name
: The topic name.description
: Descriptive help text for the topic.example
: Usage example or examples. This column might be blank.
Example:
HELP 'replace'
Yields:
name: REPLACE description: Syntax: REPLACE(str,from_str,to_str) Returns the string str with all occurrences of the string from_str replaced by the string to_str. REPLACE() performs a case-sensitive match when searching for from_str. example: mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww'); -> 'WwWwWw.mysql.com'
Result set containing multiple rows with two columns
This means that the search string matched many help topics. The result set indicates the help topic names:
name
: The help topic name.is_it_category
:Y
if the name represents a help category,N
if it does not. If it does not, thename
value when specified as the argument to theHELP
statement should yield a single-row result set containing a description for the named item.
Example:
HELP 'status'
Yields:
+-----------------------+----------------+ | name | is_it_category | +-----------------------+----------------+ | SHOW | N | | SHOW ENGINE | N | | SHOW MASTER STATUS | N | | SHOW PROCEDURE STATUS | N | | SHOW SLAVE STATUS | N | | SHOW STATUS | N | | SHOW TABLE STATUS | N | +-----------------------+----------------+
Result set containing multiple rows with three columns
This means the search string matches a category. The result set contains category entries:
source_category_name
: The help category name.name
: The category or topic nameis_it_category
:Y
if the name represents a help category,N
if it does not. If it does not, thename
value when specified as the argument to theHELP
statement should yield a single-row result set containing a description for the named item.
Example:
HELP 'functions'
Yields:
+----------------------+-------------------------+----------------+ | source_category_name | name | is_it_category | +----------------------+-------------------------+----------------+ | Functions | CREATE FUNCTION | N | | Functions | DROP FUNCTION | N | | Functions | Bit Functions | Y | | Functions | Comparison operators | Y | | Functions | Control flow functions | Y | | Functions | Date and Time Functions | Y | | Functions | Encryption Functions | Y | | Functions | Information Functions | Y | | Functions | Logical operators | Y | | Functions | Miscellaneous Functions | Y | | Functions | Numeric Functions | Y | | Functions | String Functions | Y | +----------------------+-------------------------+----------------+
Traduction non disponible
Le manuel MySQL n'est pas encore traduit en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Document créé le 26/06/2006, dernière modification le 26/10/2018
Source du document imprimé : https://www.gaudry.be/mysql-rf-help.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.