, Table of Contents
About the book .................................................................................. 5
About the author ........................................................................... 6
Sponsors ........................................................................................ 7
Ebook PDF Generation Tool ........................................................... 9
Book Cover .................................................................................. 10
License ........................................................................................ 11
Databases ........................................................................................ 12
Tables and columns ..................................................................... 13
MySQL ............................................................................................... 15
Installing MySQL .......................................................................... 16
Accessing MySQL via CLI ............................................................. 18
Creating a database .................................................................... 19
Configuring .my.cnf ..................................................................... 20
The mysqladmin command ......................................................... 21
GUI clients ................................................................................... 22
Tables ............................................................................................... 23
Data types ................................................................................... 24
Creating a database .................................................................... 25
Creating tables ............................................................................ 27
Dropping tables ........................................................................... 29
Allowing NULL values .................................................................. 30
Specifying a primary key ............................................................. 31
Updating tables ........................................................................... 32
,Basic Syntax .................................................................................... 34
INSERT ......................................................................................... 35
SELECT ........................................................................................ 36
UPDATE ....................................................................................... 38
DELETE ........................................................................................ 39
Comments ................................................................................... 40
Conclusion ................................................................................... 41
SELECT .............................................................................................. 42
SELECT all columns ..................................................................... 44
Formatting ................................................................................... 46
SELECT specific columns only ..................................................... 47
LIMIT ............................................................................................ 48
COUNT ......................................................................................... 49
MIN, MAX, AVG, and SUM ............................................................ 50
DISTINCT ..................................................................................... 52
Conclusion ................................................................................... 54
WHERE .............................................................................................. 55
WHERE Clause example .............................................................. 56
Operators .................................................................................... 58
AND keyword ............................................................................... 59
OR keyword ................................................................................. 60
LIKE operator ............................................................................... 61
IN operator ...................................................................................... 62
IS operator ................................................................................... 63
Conclusion ................................................................................... 64
, Sorting with ORDER and GROUP BY ............................................ 65
ORDER BY .................................................................................... 66
GROUP BY .................................................................................... 69
INSERT .............................................................................................. 70
Inserting multiple records ........................................................... 72
UPDATE ............................................................................................ 73
DELETE ............................................................................................. 76
JOIN ................................................................................................... 77
Cross join ..................................................................................... 80
Inner join ..................................................................................... 82
Left join ....................................................................................... 84
Right join ..................................................................................... 85
Conclusion ................................................................................... 87
The MySQL dump command ......................................................... 88
Exporting a Database .................................................................. 89
Exporting all databases ............................................................... 90
Automated backups ....................................................................... 92
Conclusion ................................................................................... 94
Conclusion ....................................................................................... 95
Other eBooks ............................................................................... 96
About the book .................................................................................. 5
About the author ........................................................................... 6
Sponsors ........................................................................................ 7
Ebook PDF Generation Tool ........................................................... 9
Book Cover .................................................................................. 10
License ........................................................................................ 11
Databases ........................................................................................ 12
Tables and columns ..................................................................... 13
MySQL ............................................................................................... 15
Installing MySQL .......................................................................... 16
Accessing MySQL via CLI ............................................................. 18
Creating a database .................................................................... 19
Configuring .my.cnf ..................................................................... 20
The mysqladmin command ......................................................... 21
GUI clients ................................................................................... 22
Tables ............................................................................................... 23
Data types ................................................................................... 24
Creating a database .................................................................... 25
Creating tables ............................................................................ 27
Dropping tables ........................................................................... 29
Allowing NULL values .................................................................. 30
Specifying a primary key ............................................................. 31
Updating tables ........................................................................... 32
,Basic Syntax .................................................................................... 34
INSERT ......................................................................................... 35
SELECT ........................................................................................ 36
UPDATE ....................................................................................... 38
DELETE ........................................................................................ 39
Comments ................................................................................... 40
Conclusion ................................................................................... 41
SELECT .............................................................................................. 42
SELECT all columns ..................................................................... 44
Formatting ................................................................................... 46
SELECT specific columns only ..................................................... 47
LIMIT ............................................................................................ 48
COUNT ......................................................................................... 49
MIN, MAX, AVG, and SUM ............................................................ 50
DISTINCT ..................................................................................... 52
Conclusion ................................................................................... 54
WHERE .............................................................................................. 55
WHERE Clause example .............................................................. 56
Operators .................................................................................... 58
AND keyword ............................................................................... 59
OR keyword ................................................................................. 60
LIKE operator ............................................................................... 61
IN operator ...................................................................................... 62
IS operator ................................................................................... 63
Conclusion ................................................................................... 64
, Sorting with ORDER and GROUP BY ............................................ 65
ORDER BY .................................................................................... 66
GROUP BY .................................................................................... 69
INSERT .............................................................................................. 70
Inserting multiple records ........................................................... 72
UPDATE ............................................................................................ 73
DELETE ............................................................................................. 76
JOIN ................................................................................................... 77
Cross join ..................................................................................... 80
Inner join ..................................................................................... 82
Left join ....................................................................................... 84
Right join ..................................................................................... 85
Conclusion ................................................................................... 87
The MySQL dump command ......................................................... 88
Exporting a Database .................................................................. 89
Exporting all databases ............................................................... 90
Automated backups ....................................................................... 92
Conclusion ................................................................................... 94
Conclusion ....................................................................................... 95
Other eBooks ............................................................................... 96