mysql
Introduction
First Chapter
日期函数
排序中有null字段希望null值置为最后
字符串函数
控制语句
外键约束
Insert
Show语句
函数
cast
convert
总:取得前一次MYSQL操作影响的记录行数
总:联合主键
总: last_insert_id()
3.1 Connecting to and Disconnecting from the Server
3.2 Entering Queries
3.3 Creating and Using a Database
3.3.1 Creating and Selecting a Database
3.3.2 Creating a Table
3.3.3 Loading Data into a Table
3.3.4 Retrieving Information from a Table
3.3.4.1 Selecting All Data
3.3.4.2 Selecting Particular Rows
3.3.4.3 Selecting Particular Columns
3.3.4.4 Sorting Rows
3.3.4.5 Date Calculations
3.3.4.6 Working with NULL Values
3.3.4.7 Pattern Matching
3.3.4.8 Counting Rows
3.3.4.9 Using More Than one Table
3.4 Getting Information About Databases and Tables
3.5 Using mysql in Batch Model
3.6 Examples of Common Queries
3.6.1 The Maximum Value for a Column
3.6.2 The Row Holding the Maximum of a Certain Column
3.6.3 Maximum of Column per Group
3.6.4 The Rows Holding the Group-wise Maximum of a Certain Column
3.6.5 Using User-Defined Variables
* 3.6.6 Using Foreign Keys
3.6.7 Search on Two Keys
* 3.6.8 Calculating Visits Per Day
* 3.6.9 使用AUTO_INCREMENT
3.7 Using MySQL with Apache
9.1 Literal Values
9.1.1 String Literals
9.2 Schema Object Names
9.2.1 Identifier Qualifiers
9.2.2 Identifier Case Sensitivity
9.2.4 Function Name Parsing and Resolution
9.3 Keywords and Reserved Words
9.4 User-Defined Variable
9.6 Comment Syntax
5.1.8 Server SQL Modes
11.2 Numberic Types
11.2.1 Integer Types(Exact Value) - INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT
11.2.2 Fixed-Point Types(Exact Value) - DECIMAL, NUMERIC
11.2.3 Floating-Point Types(Approximate Value) -FLOAT, DOUBLE
11.2.4 Bit-Value Type - BIT
11.2.5 Numeric Type Attributes
11.2.6 Out-of-Range and Overflow Handling
11.3 Date and Time Types
11.3.1 The DATE, DATETIME, and TIMESTAMP Types
11.3.2 The TIME Type
11.3.3 The YEAR Type
11.4 String Types
11.4.1 The CHAR and VARCHAR Types
11.4.2 The BINARY and VARBINARY Types
* 11.4.3 The BLOB and TEXT Types
11.4.4 The ENUM Type
11.4.5 The Set Type
* 11.6 The JSON Data Type *
11.7 Data Type Default Values
11.9 Choosing the Right Type for a Column
12 Functions and Operators
12.2 Type Conversion in Expression Evaluation
12.4 Control Flow Functions
12.5 字符串函数(String Functions)
13.1 Data Defintion Statements
13.1.1 ALTER DATABASE Syntax
13.1.12 CREATE EVENT Syntax
13.1.14 CREATE INDEX Syntax
注: MySQL大小写敏感说明
注: lower_case_table_names(大小写敏感)
注:mysql事务
注:报错信息收集
23.4.2 Event Scheduler Configuration
1.8.2.4 '--' as the Start of a Comment
1.8.2.1 SELECT INTO TABLE Differences
13.2.9.1 SELECT ... INTO Syntax
13.1.18.5 CREATE TABLE ... SELECT Syntax
13.1.20 CREATE TRIGGER Syntax
1.8.1 MySQL Extensions to Standard SQL
1.8.2 MySQL Differences from Standard SQL
1.8.2.2 UPDATE Differences
1.8.2.3 Foreign Key Differences
13.6 Compound-Statement Syntax
13.6.1 BEGIN ... END Compound-Statement Syntax
13.6.2 Statement Label Syntax
13.6.3 DECLARE Syntax
13.6.4 Variables in Stored Programs
13.6.4.1 Local Variable DECLARE Syntax
13.6.4.2 Local Variable Scope and Resolution
13.6.5 Flow Control Statements
13.6.5.2 IF Syntax
13.6.5.3 ITERATE Syntax
13.6.5.4 LEAVE Syntax
13.6.5.5 LOOP Syntax
13.6.5.6 REPEAT Syntax
13.6.5.8 WHILE Syntax
13.6.6 Cursors
13.6.6.1 Cursor CLOSE Syntax
13.6.6.2 Cursor DECLARE Syntax
13.6.6.3 Cursor FETCH Syntax
13.6.6.4 Cursor OPEN Syntax
13.6.5.1 CASE Syntax
13.1.16 CREATE PROCEDURE and CREATE FUNCTION Syntax
13.1.31 DROP TRIGGER Syntax
* 13.1.33 RENAME TABLE Syntax
23.1 Defining Stored Programs
13.6.5.7 RETURN Syntax
13.6.7 Condition Handling
23.3 Using Triggers
23.3.1 Trigger Syntax and Examples
23.3.2 Trigger Metadata
* 13.1.21 CREATE VIEW Syntax
6.1 General Security Issues
6.1.1 Security Guidelines
2.10 Postinstallation Setup and Testing
6.2 The MySQL Access Privilege System
6.1.2.1 End-User Guidelines for Password Security
4.6.6 mysql_config_editor - MySQL Configuration Utility
* 4.2.6 Using Option Files
13.5 Prepared SQL Statement Syntax
13.7.4.1 SET Syntax for Variable Assignment
13.7.4.2 SET CHARACTER SET Syntax
13.7.4.3 SET NAMES Syntax
13.2.9.3 UNION Syntax
13.2.10 SubQuery Syntax
13.2.10.1 The Subquery as Scalar Operand
13.2.10.2 Comparisons Using Subqueries
13.2.10.3 Subqueries with ANY, IN, or SOME
13.2.10.4 Subqueries with ALL
13.2.10.5 Row Subqueries
13.3.2 Statements That Cannot Be Rolled Back
13.3.5 LOCK TABLES and UNLOCK TABLES Syntax
注:查询的一些总结
185. Department Top Three Salaries(LeetCode)
196. Delete Duplicate Emails(LeetCode)
262. Trips and Users(LeetCode)
13.2 Data Manipulation Statements
13.2.1 CALL Syntax
12.14 Information Functions
DATABASE()
ROW_COUNT()
USER()
CURRENT_USER, CURRENT_USER()
13.7.1.2 CREATE USER Syntax
6.2.1 Privileges Provided by MySQL
6.2.3 Specifying Account Names
* 13.2.2 DELETE Syntax
CHARSET(str)
CONNECTION_ID()
COLLATION(str)
13.5 Prepared SQL Statement Syntax
13.5.1 PREPARE Syntax
13.5.2 EXECUTE Syntax
13.5.3 DEALLOCATE PREPARE Syntax
13.8.4 USE Syntax
总:MySQL的语句执行顺序
总:MySQL数据库表示、列名、别名区分大小写的问题
w3c: SQL UNIQUE约束
w3c: SQL PRIMARY KEY约束
总:全面了解mysql中utf8和utf8mb4的区别
总:mysql事务
13.2.8 REPLACE Syntax
总:查看mysql数据库及表编码格式
11.3.5 TIMESTAMP和DATETIME类型自动初始化(Automatic Initialization and Updating for TIMESTAMP and DATETIME)
4.2.6 使用配制文件(Using Option Files)
12.7 日期和时间函数(Date and Time Functions)
Powered by
GitBook
Show语句
COLUMNS
SHOW COLUMNS FROM tbl_name LIKE 'enum_col'
Warnings
show warnings;
每次查寻时,warings的结果值都会被覆盖
results matching "
"
No results matching "
"