Home > Database > Mysql Tutorial > body text

How to use mysql database online help

黄舟
Release: 2016-12-14 14:42:55
Original
1389 people have browsed it

In different mysql versions, many features and syntax may be different. How can we know what the syntax of the current version is like? The best way is to learn to use mysql's help. The method is very simple:
1.1 Look at the help by level
If you don’t know what the help can provide, you can look down layer by layer:
The command is as follows:
mysql>sss ? contentsnnn
You asked for helpabouthelpcategory:"Contents"
For more information, type 'help', where isone of the following
categories:
AccountManagement
Administration
Data Definition
Data Manipulation
Data Types
Functions
FunctionsandModifiers for Usewith GROUPBY
GeographicFeatures
Langu ageStructure
Plugins
Storage Engines
Stored Routines
Table Maintenance
Transactions
Triggers
For the listed categories, you can look at the part you are interested in, for example:
mysqsssl> ? datatatattyppppes
You asked for helpabouthelpcategory: "DataTypes"
For more information, type'help< ;item>', where is one of the following
topics:
AUTO_INCREMENT
BIGINT
BINARY
BIT
BLOB
BLOBDATA TYPE
BOOLEAN
. . . . . .
For the specific data types listed, you can see further details:
mysql>sss? int
Name: 'INT'
Description:
INT[(M)] [UNSIGNED][ZEROFILL]
A normal-sizeinteger.The signedrangeis-2147483648 to 2147483647.
The unsignedrangeis0to 4294967295.
1.2 Quick reference help
In practice, if we need to quickly check a certain grammar, we can use keywords for quick query. For example, if I want to know what the show command can see, I can use the following command:
mysql>sss ? showwww
Name: 'SHOW' server.Thissectiondescribes
those following:
SHOWAUTHORS
SHOWCHARACTERSET[LIKE 'pattern']
SHOWCOLLATION[LIKE 'pattern']
SHOW[FULL]COLUMNSFROM tbl_name[FROM db_name] [LIKE 'pattern']
SHOWCONTRIBUTORS
SHOWCREATEDATABASEdb _name
SHOWCREATEEVENT event_name
SHOWCREATEFUNCTION funcname
. . . . . .
I want to know the syntax of createtable, you can use the following command:
mysql>sss ? createttt tablebbb
Name: 'CREATETABLE'
Description:
Syntax:
CREATE[TEMPORARY]TABLE[IFNOT EXISTS]tbl_name
(create_definition,...)
[table_option...]
[partition_options]
Or:
CREATE[TEMPORARY]TABLE[IFNOT EXISTS]tbl_name
[(create_definition,...)]
[table_option...]
[partition_options]
select_statement

Thank you for reading. For more related articles, please pay attention to the PHP Chinese website (m.sbmmt.com)!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!