Quick review on SQL
This section provides a brief overview of SQL. For a complete course on SQL, please refer to the resources.
* SQL Data Types
* SQL Commands:
SELECT
WHERE
AND, OR, NOT
ORDER BY
CREATE DATABASE
DROP DATABASE
CREATE TABLE
DROP TABLE
INSERT INTO
JOINS
Data Types
Numerous data types are available depending on the software you use. However, we will focus on a few of the commonly used data types in MySQL.
VARCHAR(size) : this is used to store character strings of variable length. The "size" parameter specifies the max length of the string that can be stored in the column
INTEGER: used to store whole numbers (positive or negative) without decimal points.
DATE - used to store date values.
BOOLEAN - used to store true/false values.
DECIMAL - used to store exact numeric values with decimal points.
FLOAT - used to store approximate numeric values with decimal points.
CREATE DATABASE
This command is used to create a new SQL database
DROP DATABASE
This command is used to drop an existing SQL database
CREATE TABLE
This command is used to create a new table within a database
common constraints:
ALTER
DATES
SELECT
This command is used to select any columns from a table within a database
To select all columns
WHERE
This command is used to filter records
AND, OR, NOT
ORDER BY
Last updated