MySQL Data Types
The data type of a column defines what value the column can hold: integer, character, money, date and time, binary, and so on. MySQL Data Types (Version 8.0) Each column in a database table is required to have a name…
The data type of a column defines what value the column can hold: integer, character, money, date and time, binary, and so on. MySQL Data Types (Version 8.0) Each column in a database table is required to have a name…
MySQL CREATE VIEW Statement In SQL, a view is a virtual table based on the result-set of an SQL statement. A view contains rows and columns, just like a real table. The fields in a view are fields from one…
MySQL Dates The most difficult part when working with dates is to be sure that the format of the date you are trying to insert, matches the format of the date column in the database. As long as your data…
What is an AUTO INCREMENT Field? Auto-increment allows a unique number to be generated automatically when a new record is inserted into a table. Often this is the primary key field that we would like to be created automatically every…
MySQL CREATE INDEX Statement The CREATE INDEX statement is used to create indexes in tables. Indexes are used to retrieve data from the database more quickly than otherwise. The users cannot see the indexes, they are just used to speed…
MySQL DEFAULT Constraint The DEFAULT constraint is used to set a default value for a column. The default value will be added to all new records, if no other value is specified.
MySQL CHECK Constraint The CHECK constraint is used to limit the value range that can be placed in a column. If you define a CHECK constraint on a column it will allow only certain values for this column. If you…
MySQL FOREIGN KEY Constraint The FOREIGN KEY constraint is used to prevent actions that would destroy links between tables. A FOREIGN KEY is a field (or collection of fields) in one table, that refers to the PRIMARY KEY in another…
MySQL PRIMARY KEY Constraint The PRIMARY KEY constraint uniquely identifies each record in a table. Primary keys must contain UNIQUE values, and cannot contain NULL values. A table can have only ONE primary key; and in the table, this primary…