MySQL Tutorials - Herong's Tutorial Examples

http://www.herongyang.com/MySQL

Copyright © 2015 by Dr. Herong Yang. All rights reserved.

MySQL Tutorials This free MySQL tutorial book is a collection of notes and sample codes written by the author while he was learning MySQL himself, an ideal tutorial guide for beginners. Topics include SQL, MySQL, database, table, column, index, null, insert, update, delete, select, order by, group by, deadlock...

Table of Contents

About This Book

Introduction of SQL

What Is SQL?

SQL History and Revisions

SQL and Database Terminologies

MySQL Introduction and Installation

What Is MySQL?

Downloading and Installing MySQL

Issues during MySQL Installation

Starting and Stopping MySQL Server

Creating First Table in MySQL

Un-Installing MySQL

Using MySQL Noinstall Package

Introduction of MySQL Programs

List of MySQL Programs

mysqld - The MySQL Server Program

mysqladmin - The Client Tool for Administrators

mysql - The Client Tool for End Users

Using mysql to Run SQL Statements

mysqldump - Dumping Data to Files

mysqlimport - Loading Data from Files

Perl Programs and MySQL Servers

Accessing MySQL Servers from Perl Programs

HelloMySQL.pl - Sample Perl Program to Use MySQL

PHP Programs and MySQL Servers

Configuring PHP for MySQL Server Access

mysqli_connect() and Other MySQL Functions

MySqlLoop.php - MySQL Functions Test

Java Programs and MySQL Servers

MySQL Connector/J - Download and Installation

Loading JDBC Driver Class - com.mysql.jdbc.Driver

JDBC Driver Connection URL

Creating Connections with DataSource Class

Getting Driver and Server Information

Creating Tables with AUTO_INCREMENT Columns

"INSERT INTO" Statements

Datatypes and Data Literals

Introduction of Datatype

Data Binary Representations

Data Literals

Data Literal Evaluation

Character String Literal Evaluation Examples

Hex String Literal Evaluation Examples

Numeric Literal Evaluation Examples

Operations and Expressions

What Is Expression

Arithmetic Operations

Predicate Operations

Date and Time Operations

Examples of Different Types of Operation

Character Strings and Bit Strings

Operatins and Functions for Character Strings

Operatins and Functions for Bit Strings

Commonly Used Functions

Flow Control Functions

Character String Functions

Numeric Functions

Date and Time Functions

Cast Function

Table Column Types for Different Types of Values

Table Column Types for Character Strings

Table Column Types for Bit Strings

Table Column Types for Exact Numbers

Table Column Types for Approximate Numbers

Table Column Types for Date and Time Values

Using DDL to Create Tables and Indexes

CREATE TABLE - Statement to Create Tables

Column Options When Creating Tables

CREATE INDEX - Statement to Create Indexes

ALTER TABLE - Statement to Alter Table Structures

Using DML to Insert, Update and Delete Records

INSERT INTO - Statement to Insert Records to Tables

UPDATE - Statement to Update Records in Tables

DELETE FROM - Statement to Delete Records from Tables

Using SELECT to Query Database

SELECT Statements

FROM Clause of a SELECT Statement

JOIN -Operations to Join Two Tables

JoinTable.sql - Example of Join Tables

WHERE Clause of a SELECT Statement

GROUP BY Clause of a SELECT Statement

ORDER BY Clause of a SELECT Statement

Transaction Management and Isolation Levels

What Is a Transaction?

Transaction Management in MySQL

Transaction Isolation Levels

"Read Uncommitted" Isolation Level

"Read Committed" Isolation Level

"Repeatable Read" Isolation Level

Locks Used in MySQL

Lock Types and Lock Levels

Table Level Locks in MySQL

Row Level Locks in MySQL

Defining and Calling Stored Procedures

What Is a Stored Procedures?

CREATE PROCEDURE - Statement to Create Stored Procedures

Stored Procedure Parameters

Variables, Loops and Cursors Used in Stored Procedures

Local Variables in Stored Procedures

Execution Flow Control Statements

ITERATE and LEAVE - Statements to Break Loops

DECLARE ... CURSOR FOR Select Statements

Outdated Tutorials

Outdated: Installing MySQL 5.6.28

Outdated: Installing MySQL 5.5.15

Outdated: Installing MySQL 5.0.2 (Alpha)

Outdated: Installing MySQL 4.0.18

Outdated: Creating First Table in MySQL 4.0

References

PDF Printing Version

Keywords: MySQL, SQL, Language, Database, Tutorial