What is MySQL index?

Indexing in MySQL is used to speed up and facilitate data retrieval. If an index has been attached to a column, the MySQL data query "jumps" immediately to that particular row, skipping t...

The UNIQUE constraint in MySQL

The UNIQUE constraint uniquely identifies each record in a database table. The UNIQUE and

PRIMARY key in MySQL

The PRIMARY KEY constraint uniquely identifies each record in a database table. Following rules and suggestions are applied to the PRIMARY key:

FOREIGN keys in MySQL:

A FOREIGN KEY in one table points to a PRIMARY KEY in another table. Let say we have two tables here, Emp & Dept. Note that DeptNo column in Dept table points to colum...

What is CHECK constraint in MySQL?

The CHECK constraint specifies a condition that must be true when manipulating the database table. Following example shows how a CHECK constraint may be implemented:

The DEFAULT constraint in MySQL

The DEFAULT constraint is used to insert a default value into a column. The default value will be added to all new records, if no other value is specified. CREATE TAB...