Jump to content
Nytro

MySQL Tutorial

Recommended Posts

MySQL Tutorial

Abstract

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

Document generated on: 2012-08-04 (revision: 31551)

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

Download:

http://downloads.mysql.com/docs/mysql-tutorial-excerpt-5.1-en.pdf

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...