MySQL built-in help parsing
This article mainly explains the "MySQL built-in help analysis", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "MySQL built-in help analysis" bar!
1. Log in to MySQL and ask for the built-in instructions of the system
Root@db02 scripts] # mysql-uroot-S / data/3306/mysql.sock Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 1Server version: 5.6.36 Source distributionCopyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql >? Contents # # We didn't know how to use it, so we asked the system, what do you have? Here's what it feeds back to you: Account Management # # account management Administration # manage Compound Statements # # compound statement Data Definition # # data definition Data Manipulation # # data operation Data Types # # data type Functions # # function Functions and Modifiers for Use with GROUP BY # # functions and modifiers used with groups Geographic Features # # Geography Feature Help Metadata # # help metadata Language Structure # # language structure Plugins # # plug-in Procedures # # Program Storage Engines # # Storage engine Table Maintenance # # Table maintenance Transactions # # transaction User-Defined Functions # # user-defined function Utility # # Utility
2. According to the instructions given by it, we make the following inquiry.
1) for example: we want to create a new database, how to find the syntax?
Mysql >? Data Definition # looked at the instructions above, and it should be in how the data is defined, so? Question mark it; You asked for help about help category: "Data Definition" For more information, type 'help', where is one of the followingtopics: CREATE DATABASE CREATE EVENT CREATE FUNCTION CREATE INDEX CREATE LOGFILE GROUP CREATE PROCEDURE CREATE SERVER CREATE TABLE CREATE TABLESPACE CREATE TRIGGER. Several omission options
2) through the above, I found the CREATE DATABASE option, but I still can't build a database, so keep asking.
Mysql >? CREATE DATABASEName: 'CREATE DATABASE'Description:Syntax:CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name # find the syntax for creating a new database this time. You can create [create_specification] directly. # # you need to note that {} curly braces are optional and can be ignored. Other required options are create_specification: [DEFAULT] CHARACTER SET [=] charset_name | [DEFAULT] COLLATE [=] collation_nameCREATE DATABASE creates a database with the given name. To use thisstatement, you need the CREATE privilege for the database. CREATESCHEMA is a synonym for CREATE DATABASE.URL: http://dev.mysql.com/doc/refman/5.6/en/create-database.html
3) according to the syntax prompted by the system, create a new database of qiuyuetao
Mysql > create database qiuyuetao;Query OK, 1 row affected (0.05sec) mysql > show databases;+-+ | Database | +-+ | information_schema | | mysql | | performance_schema | | qiuyuetao | | test | +-+ 5 rows in set (0.07 sec)
3There are three types of SQL statements.
1) DDL: the language of data definition, but? Data Definition to inquire.
Create, alter, drop, manage basic data: for example, libraries, tables
2) DCL:Data control Language- data control language
Grant, revoke, commit,rollback, user authorization, rights recovery, data submission rollback
3) DML:Date Manipulation Language- data manipulation language
Select, update, delete, insert, do operations on tables and records thank you for your reading, these are the contents of "MySQL built-in help parsing". After the study of this article, I believe you have a deeper understanding of the problem of MySQL built-in help parsing, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!