MySQL Databases and Tables
This chapter introduces the operations related to databases and tables in MySQL, including creating and deleting databases, creating and deleting tables, modifying table columns, primary keys, data constraints, and data types.
-
MySQL Create Databases
In this article, we covers creating a new database using theCREATE DATABASEstatement. -
MySQL Drop Databases
In this article, we described how to drop a database using theDROP DATABASEstatement. -
MySQL Use Database
In this article, we explained how to select a database in MySQL and how to view the current database. -
MySQL Create Tables
In this article, we covered creating a new table using theCREATE TABLEstatement. -
MySQL Drop Tables
In this article, we described how to drop an existing table using theDROP TABLEstatement. -
MySQL Alters Tables
In this article, we will describe how to use theALTER TABLEstatement. -
MySQL Truncate Tables
In this article, we described how to use theTRUNCATE TABLEstatement to truncate a table. -
MySQL Primary Keys
In this article, we will learn what primary keys are, the rules of primary keys, and how to use primary keys in MySQL. -
MySQL Foreign Keys
In this article, we introduced what foreign keys are, the rules for foreign keys, and how to use them in MySQL. -
MySQL Lock Tables
In this article, you will learn how to acquire and release table locks using MySQLLOCK TABLESandUNLOCK TABLESstatements. -
MySQL Drop Columns
In this article, you will learn how to drop one or more columns from a table using MySQLALTER TABLE ... DROP COLUMNstatements. -
MySQL Add Columns
In this article, you will learn how to add one or more columns to a table using MySQLALTER TABLE ... ADDstatements. -
MySQL Auto Increment Columns
In this article, we will introduce MySQL auto-increment columns and how to use auto-increment columns to generate unique identifiers. -
MySQL Check Constraints
In this article, you will learn how to use MySQL CHECK constraints to ensure that the data inserted into a table is correct. -
MySQL Rename Tables
In this article, you will learn how to rename a table using MySQLRENAME TABLEandALTER TABLEstatements. -
MySQL Generated Columns
In this article, we’ll introduce the usage of generated columns in MySQL. -
MySQL Unique Keys
In this article, we describe how to use unique keys/unique indexes in MySQL to ensure that the values โโof one or several columns are unique. -
MySQL NOT NULL
In this article, we will discuss how to useNOT NULLconstrain. -
MySQL Charset and Collation
A character set is a set of rules for representing characters, and a collation defines the order of characters in a character set. Character sets are used to store data. A character set can contain multiple collations.