Skip to Main Content
The world's most popular open source database
Contact MySQL  | 
Login  |  Register
  • MySQL.com
  • Downloads
  • Documentation
  • Developer Zone
Developer Zone Downloads MySQL.com
Documentation
  • MySQL Server
  • MySQL Enterprise
  • Workbench
  • InnoDB Cluster
  • MySQL NDB Cluster
  • Connectors
  • More
  • MySQL.com
  • Downloads
  • Developer Zone
Section Menu:  
Documentation Home
MySQL Tutorial
  • Preface and Legal Notices
  • Tutorial
  • Connecting to and Disconnecting from the Server
  • Entering Queries
  • Creating and Using a Database
    • Creating and Selecting a Database
    • Creating a Table
    • Loading Data into a Table
    • Retrieving Information from a Table
      • Selecting All Data
      • Selecting Particular Rows
      • Selecting Particular Columns
      • Sorting Rows
      • Date Calculations
      • Working with NULL Values
      • Pattern Matching
      • Counting Rows
      • Using More Than one Table
  • Getting Information About Databases and Tables
  • Using mysql in Batch Mode
  • Examples of Common Queries
    • The Maximum Value for a Column
    • The Row Holding the Maximum of a Certain Column
    • Maximum of Column per Group
    • The Rows Holding the Group-wise Maximum of a Certain Column
    • Using User-Defined Variables
    • Using Foreign Keys
    • Searching on Two Keys
    • Calculating Visits Per Day
    • Using AUTO_INCREMENT
  • Using MySQL with Apache
Related Documentation
MySQL 8.0 Reference Manual
MySQL 8.0 Release Notes
Download this Excerpt
PDF (US Ltr) - 195.9Kb
PDF (A4) - 196.7Kb


version 8.0
5.7

MySQL Tutorial

Abstract

This is the MySQL Tutorial from the MySQL 8.0 Reference Manual.

For legal information, see the Legal Notices.

For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users.

Document generated on: 2023-03-31 (revision: 75276)


Table of Contents

Preface and Legal Notices
1 Tutorial
2 Connecting to and Disconnecting from the Server
3 Entering Queries
4 Creating and Using a Database
4.1 Creating and Selecting a Database
4.2 Creating a Table
4.3 Loading Data into a Table
4.4 Retrieving Information from a Table
4.4.1 Selecting All Data
4.4.2 Selecting Particular Rows
4.4.3 Selecting Particular Columns
4.4.4 Sorting Rows
4.4.5 Date Calculations
4.4.6 Working with NULL Values
4.4.7 Pattern Matching
4.4.8 Counting Rows
4.4.9 Using More Than one Table
5 Getting Information About Databases and Tables
6 Using mysql in Batch Mode
7 Examples of Common Queries
7.1 The Maximum Value for a Column
7.2 The Row Holding the Maximum of a Certain Column
7.3 Maximum of Column per Group
7.4 The Rows Holding the Group-wise Maximum of a Certain Column
7.5 Using User-Defined Variables
7.6 Using Foreign Keys
7.7 Searching on Two Keys
7.8 Calculating Visits Per Day
7.9 Using AUTO_INCREMENT
8 Using MySQL with Apache

HOME   NEXT
Related Documentation
MySQL 8.0 Reference Manual
MySQL 8.0 Release Notes
Download this Excerpt
PDF (US Ltr) - 195.9Kb
PDF (A4) - 196.7Kb
Contact MySQL Sales
USA/Canada: +1-866-221-0634   (More Countries »)
  © 2023 Oracle

  • Products
  • MySQL HeatWave
  • MySQL Enterprise Edition
  • MySQL Standard Edition
  • MySQL Classic Edition
  • MySQL Cluster CGE
  • MySQL Embedded (OEM/ISV)
  • Services
  • Training
  • Certification
  • Consulting
  • Support
  • Downloads
  • MySQL Community Server
  • MySQL NDB Cluster
  • MySQL Shell
  • MySQL Router
  • MySQL Workbench
  • Documentation
  • MySQL Reference Manual
  • MySQL Workbench
  • MySQL NDB Cluster
  • MySQL Connectors
  • Topic Guides
  • About MySQL
  • Contact Us
  • Blogs
  • How to Buy
  • Partners
  • Job Opportunities
  • Site Map
  © 2023 Oracle
Privacy / Do Not Sell My Info | Terms of Use | Trademark Policy |