MYSQL Cheat Sheet
MYSQL Cheat Sheet
MYSQL Cheat Sheet
MySQL cheat sheet provides the most commonly used MySQL statements that help you
practice MySQL more effectively.
Working with Database
Create a database with a specified name if it does not exist in database server
Use database or change current database to another database you are working with
USE database_name
Drop a database with specified name permanently. All physical file associated with
the database is no longer exists.
SHOW DATABASES
SHOW TABLES
ADD [COLUMN]
DROP [COLUMN]
Querying Data
Query specified data which is shown in the column list from a database table
SELECT *
FROM table_name1
INNER JOIN table_name2 ON conditions
SELECT *
FROM table_name1
LEFT JOIN table_name2 ON conditions
SELECT *
FROM table_name1
SELECT *
FROM table_name
GROUP BY column_name