Quick Reference
Guides
- MySQL DROP COLUMN: syntax and safetyALTER TABLE t DROP COLUMN c. MySQL has no IF EXISTS for columns, and dropping a column silently drops indexes that used it.
- MySQL SUBSTRING: extract part of a stringSUBSTRING is 1-indexed, not 0-indexed. Position 0 returns an empty string, silently.
- MySQL IF: function, statement, and IFNULLMySQL has two different IFs: an IF() function you use in queries, and an IF statement that only works inside stored programs.
- MySQL DISTINCT: remove duplicate rowsSELECT DISTINCT removes duplicate rows, not duplicate values in one column. That distinction is where most DISTINCT bugs come from.
- MySQL show usersList all MySQL users by querying the mysql.user table. No SHOW USERS command exists, but the query is straightforward.
- MySQL JOINCombine rows from multiple tables with MySQL JOINs. Covers every JOIN type with examples.
- MySQL SHOW DATABASESList all MySQL databases with SHOW DATABASES or query information_schema directly.
- MySQL data typesMySQL's data types and when to use each one.
- MySQL CREATE USERCreate MySQL users with the right host restrictions, passwords, and privileges.
- MySQL Default Port and ConfigurationMySQL uses port 3306 by default. Here's how to check and change it.
- SQL vs MySQLSQL is a language. MySQL is a database. Here's the difference.
- MySQL DELETE: Complete GuideRemove data from MySQL tables safely and efficiently.
- MySQL INSERT: Complete GuideAdd data to your MySQL tables the right way.
- MySQL CREATE DATABASEEverything you need to know about creating MySQL databases.