• CREATE TABLE

    Define a new table

  • INSERT INTO

    Create new rows in a table

  • ALTER TABLE

    Modifies a table definition

  • SELECT

    Retrieve rows from a table or view

  • WHERE

    To retrieve specific information from a table excluding other irrelevant data

  • AND

    Select rows that must satisfy all the given conditions

  • OR

    Select rows that satisfy atleast one of the given conditions

  • NOT

    Select rows that do not satisfy the given condition

  • AS (alias)

    To temporarily rename a table or a column heading

  • BETWEEN..AND..

    To select values within a range

  • GROUP BY

    To collect data across multiple records and group the results by a column

  • HAVING

    To filter data based on the group functions

  • IN

    To test whether a value is in the list of values provided

  • LIKE

    To search for a specified pattern in a column

  • DISTINCT

    To return only distinct (different) values in a column

  • ORDER BY

    To sort the records in the result based on a column

  • AVG()

    Returns the average value of a numeric column

  • COUNT()

    Returns the number of rows that matches a specified criteria

  • MAX()

    Returns the largest value of the selected column

  • MIN()

    Returns the smallest value of the selected column

  • SUM()

    Returns the total sum of a numeric column

  • CREATE VIEW

    Define a new view

  • DROP VIEW

    Remove a view

  • UPDATE

    Update rows of a table

  • CREATE INDEX

    Define a new table

  • DELETE

    Delete rows of a table

  • UPPER() or UCASE()

    Converts a field to upper case

  • LOWER() or LCASE()

    Converts a field to lower case

  • LENGTH() or LEN()

    Returns the length of a text field

  • DATE('NOW') or TIME('NOW')

    Returns the current system date and time

  • DROP TABLE

    Define a new table

  • NOT NULL

    Enforces a column to not accept NULL values

  • EXISTS

    Used in combination with a subquery and is considered to be met if the subquery returns at least one row

  • SELECT <columns> INTO

    Create a new table from the results of a query

  • INNER JOIN

    Returns all rows from both tables where there is a match

  • LEFT JOIN

    Returns all the rows from the first table even if there are no matches in the second table

  • RIGHT JOIN

    Returns all the rows from the second table, even if there are no matches in the first table

  • FULL JOIN

    Returns all rows from both tables with nulls in place where the join condition is not met

  • UNION

    Combines the result of two or more SELECT statements and selects only distinct values

  • UNION ALL

    Combines the result of two or more SELECT statements and also select duplicate values

  • UNIQUE

    Ensures that each row for a column must have a unique value

  • PRIMARY KEY

    Combination of NOT NULL and UNIQUE. It uniquely identifies each record in a database table

  • FOREIGN KEY

    Ensure the referential integrity of the data in one table to match values in another table

  • DEFAULT

    Specifies a default value for a column

  • MID()

    Extract characters from a text field

  • ROUND()

    Rounds a numeric field to the number of decimals specified

  • FORMAT()

    Formats how a field is to be displayed

Loading...