MySQL

Unleash the power of MySQL with this comprehensive card pack designed for learners of all levels in 2025! Whether you're a beginner or an advanced user, these cards cover everything you need to know, from essential statements and constraints to complex data types and functions.

Вы можете начать изучение этого набора. Вам будет отправлено 188 сообщений для повторения каждой карточки несколько раз в соответствие с кривой забывания.

Узнайте больше о методе интервального повторения.

Запланируйте ежедневные повторения карточек на случай если вам нужно запомнить за короткий срок или довести эти знания до автоматического уровня.

Узнайте больше о ежедневных практиках.
SELECT Statement

The SELECT statement is used to select data from a database.


The data returned is stored in a result table, called the result-set.

1/47
WHERE Clause

The WHERE clause is used to filter records.


It is used to extract only those records that fulfill a specified condition.

2/47
Operators in The WHERE Clause

The following operators can be used in the WHERE clause.

3/47
AND, OR and NOT Operators

The WHERE clause can be combined with AND, OR, and NOT operators.

4/47
ORDER BY Keyword

The ORDER BY keyword is used to sort the result-set in ascending or descending order.

5/47
INSERT INTO Statement

The INSERT INTO statement is used to insert new records in a table.

6/47
NULL Values

A field with a NULL value is a field with no value.

7/47
UPDATE Statement

The UPDATE statement is used to modify the existing records in a table.

8/47
DELETE Statement

The DELETE statement is used to delete existing records in a table.

9/47
LIMIT and OFFSET Clauses

The LIMIT clause is used to specify the number of records to return.

10/47
MIN() and MAX() Functions

The MIN() function returns the smallest value of the selected column.


The MAX() function returns the largest value of the selected column.

11/47
COUNT(), AVG() and SUM() Functions

The COUNT() function returns the number of rows that matches a specified criterion.


The AVG() function returns the average value of a numeric column.


The SUM() function returns the total sum of a numeric column.

12/47
LIKE Operator

The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.

13/47
IN Operator

The IN operator allows you to specify multiple values in a WHERE clause.


The IN operator is a shorthand for multiple OR conditions.

14/47
BETWEEN Operator

The BETWEEN operator selects values within a given range.

15/47
Aliases

Aliases are used to give a table, or a column in a table, a temporary name.


Aliases are often used to make column names more readable.


An alias only exists for the duration of that query.


An alias is created with the AS keyword.

16/47
INNER JOIN Keyword

The INNER JOIN keyword selects records that have matching values in both tables.

17/47
LEFT JOIN Keyword

The LEFT JOIN keyword returns all records from the left table (table1), and the matching records (if any) from the right table (table2).

18/47
RIGHT JOIN Keyword

The RIGHT JOIN keyword returns all records from the right table (table2), and the matching records (if any) from the left table (table1).

19/47
CROSS JOIN Keyword

The CROSS JOIN keyword returns all records from both tables (table1 and table2).

20/47
Self Join

A self join is a regular join, but the table is joined with itself.

21/47
UNION Operator

The UNION operator is used to combine the result-set of two or more SELECT statements.

22/47
GROUP BY Statement

The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each country".

23/47
HAVING Clause

The HAVING clause was added to SQL because the WHERE keyword cannot be used with aggregate functions.

24/47
EXISTS Operator

The EXISTS operator is used to test for the existence of any record in a subquery.


The EXISTS operator returns TRUE if the subquery returns one or more records.

25/47
ANY and ALL Operators

The ANY and ALL operators allow you to perform a comparison between a single column value and a range of other values.

26/47
INSERT INTO SELECT Statement

The INSERT INTO SELECT statement copies data from one table and inserts it into another table.

27/47
CASE Statement

The CASE statement goes through conditions and returns a value when the first condition is met (like an if-then-else statement).

28/47
NULL Functions

IFNULL and COALESCE functions let you return an alternative value if an expression is NULL.

29/47
Comments

Comments are used to explain sections of SQL statements, or to prevent execution of SQL statements.

30/47
CREATE DATABASE Statement

The CREATE DATABASE statement is used to create a new SQL database.

31/47
DROP DATABASE Statement

The DROP DATABASE statement is used to drop an existing SQL database.

32/47
CREATE TABLE Statement

The CREATE TABLE statement is used to create a new table in a database.

33/47
DROP TABLE Statement

The DROP TABLE statement is used to drop an existing table in a database.


The TRUNCATE TABLE statement is used to delete the data inside a table, but not the table itself.

34/47
ALTER TABLE Statement

The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.


The ALTER TABLE statement is also used to add and drop various constraints on an existing table.

35/47
NOT NULL Constraint

The NOT NULL constraint enforces a column to NOT accept NULL values.

36/47
UNIQUE Constraint

The UNIQUE constraint ensures that all values in a column are different.

37/47
PRIMARY KEY Constraint

The PRIMARY KEY constraint uniquely identifies each record in a table.

38/47
FOREIGN KEY Constraint

The FOREIGN KEY constraint is used to prevent actions that would destroy links between tables.

39/47
CHECK Constraint

The CHECK constraint is used to limit the value range that can be placed in a column.

40/47
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.

41/47
CREATE INDEX Statement

The CREATE INDEX statement is used to create indexes in tables.

42/47
AUTO INCREMENT Field

Auto-increment allows a unique number to be generated automatically when a new record is inserted into a table.

43/47
Views

In SQL, a view is a virtual table based on the result-set of an SQL statement.

44/47
String Data Types

The choice between CHAR, BINARY, TEXT, and BLOB depends on the type of data you intend to store and how you plan to interact with that data.

45/47
Numeric Data Types

All the numeric data types may have an extra option: UNSIGNED or ZEROFILL.

46/47
Date and Time Data Types

The choice between DATE, DATETIME, TIMESTAMP, TIME and YEAR depends on the type of data you intend to store and how you plan to interact with that data.

47/47
WitSlice © 2026