Custom Search

MySQL Database How-to Articles and Tutorials


1. Prerequisites for MySQL Query Practices

Database Design

1. How to Design Relational Database

2. Enforce Data Integrity by Database Constraints

3. How to Enforce Data Type Constraint

4. How to Enforce Defualt Constraint and Nullability Constraint

5. Primary Key Constraint and Unique Constraint

6. Foreign Key Relationships and Considerations

Single Table SELECT Statement

1. The Basic SELECT Statement

2. Using Column Alias in SELECT Statement

3. Using Literal Character Strings

4. Perform Arithmetic Operations

5. Use WHERE Clause to Conditionally Select Rows

6. Sorting Data

7. Using LIMIT Clause to Constrain the Number of Rows Retrieved

8. Using Comparison Operators, Part I

9. Using Comparison Operators, Part II

10. Using LIKE Comparison Operator

11. Using Logical Operators

12. Eliminating Duplicate Rows

Using Single-Row Functions

1. Using String Functions, Part 1

2. Using String Functions, Part 2

3. Using String Functions, Part 3

4. Using MySQL Date and Time Functions, Part 1

5. Using MySQL Date and Time Functions, Part 2

6. Using MySQL Date and Time Functions, Part 3

7. Using MySQL Control Flow Functions

8. Using MySQL Conversion Functions

9. Using MySQL Comparison Functions

10. Using Aggregate Functions in MySQL

11. Numeric Functions in MySQL

12. Miscellaneous Functions in MySQL

13. Using LIMIT and SQL_CALC_FOUND_ROWS and FOUND_ROWS() to Page Thru Query Result

Querying Multiple Tables

1. Using Inner Joins to Combine Data from Two Tables

2. Using Outer Joins to Combine Data from Two Tables

3. Using Self Joins to Combine Data from the Same Table

4. Using UNION to Append Result Sets

Using Subquery

1. What is subquery

2. Using subquery to return a single value (known as single-value subquery or scalar subquery)

3. Using subquery to return a list of values (known as column subquery)

4. Using subquery to return one ore more rows of values (known as row subquery)

5. Using correlated subqueries

6. Using EXISTS and NOT EXISTS in correlated subqueries in MySQL

7. Using subquery in SELECT statement in MySQL

8. Using subquery in FROM clause in MySQL

9. JOIN a table with a subquery

Summarizing Data

1. Using Aggregate Functions and Group By Clause in MySQL

2. More About GROUP BY Clause in MySQL

3. Using GROUP BY with HAVING Clause in MySQL

4. Summarizing Data From Multiple Tables in MySQL

5. Summarizing Data From Multiple Tables in MySQL - Part 2

Data Manipulation

1. Update Statement in MySQL

2. How to update top N rows of data in MySQL

3. How to update data in a specific order in MySQL

4. Use outer join in update

5. Basic insert statement

6. How to create and use AUTO_INCREMENT column and use LAST_INSERT_ID function

7. How to do cross-table update in MySQL - Part 1

8. How to do cross-table update in MySQL - Part 2

9. Using Bulk Insert Statement

10. Combine update and insert into one statement


Managing Tables

1. Create MySQL table by using CREATE TABLE statement

2. Create MySQL table by using another table

3. Create MySQL temporary table

Stored Procedures

User Defined Functions

Problem Solving

1. MySQL Northwind Queries - Part 1

2. MySQL Northwind Queries - Part 2

3. MySQL Northwind Queries - Part 3

4. How to work with two unrelated values in MySQL

Copyright © 2017 All Rights Reserved.

This website is hosted by HostGator.

No portion may be reproduced without my written permission. Software and hardware names mentioned on this site are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Drop me an email and I will promptly and gladly rectify it.

Home | Feedback | Terms of Use | Privacy Policy