MySql Cheatsheet
Displaying Data -- Display available databases SHOW DATABASES; -- Display available tables in the current database SHOW TABLES; -- Display fields from a table / Describe table structure SHOW FIELDS FROM table / DESCRIBE table; -- Display the command used to create a specific table SHOW CREATE TABLE table; -- Display a list of active processes (queries) in the database SHOW PROCESSLIST; -- Terminate a running process with a specified number KILL process_number; Select Queries -- Select all columns from a specific table SELECT * FROM table; -- Select all columns from two tables (creates a Cartesian product) SELECT * FROM table1, table2; -- Select specific columns from two tables (creates a Cartesian product) SELECT column1, column2 FROM table1, table2; -- Select data from a table that meets a specified condition SELECT ....