-
Notifications
You must be signed in to change notification settings - Fork 0
/
ADDITIONAL_FUNCTIONS_in_MYSQL .txt
36 lines (35 loc) · 3.74 KB
/
ADDITIONAL_FUNCTIONS_in_MYSQL .txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
**************** Дополнительные функции MySQL ****************
CASE - MySQL функция CASE оценивает условия и возвращать значение при выполнении
первого условия.
COALESCE - MySQL функция COALESCE возвращает первое ненулевое выражение в списке.
NULLIF - MySQL функция NULLIF возвращает NULL, если два выражения эквивалентны. В противном
случае возвращается первое выражение.
BIN - MySQL функция BIN преобразует десятичное число в двоичное число и возвращает
результат в виде строки.
BINARY - MySQL функция BINARY преобразует значение в двоичную строку.
CAST - MySQL функция CAST преобразует значение из одного типа данных в другой.
CONNECTION_ID - MySQL функция CONNECTION_ID возвращает идентификатор соединения для
текущего соединения, которое является уникальным идентификатором
среди подключенных клиентов.
CONV - MySQL функция CONV преобразует число из одной числовой базы в другую и
возвращает результат в виде строкового значения.
CONVERT - MySQL функция CONVERT преобразует значение из одного типа данных в
другой или один набор символов в другой.
CURRENT_USER - MySQL функция CURRENT_USER возвращает имя пользователя и имя хоста
для учетной записи MySQL, которая использовалась сервером для
аутентификации текущего клиента.
DATABASE - MySQL функция DATABASE возвращает имя базы данных по умолчанию.
IF - MySQL функция IF возвращает одно значение, если условие принимает значение TRUE,
или другое значение, если условие принимает значение FALSE.
IFNULL - MySQL функция IFNULL позволяет вам возвращать альтернативное значение, если
выражение равно NULL.
ISNULL - MySQL функция ISNULL проверяет, является ли выражение NULL.
LAST_INSERT_ID - MySQL функция LAST_INSERT_ID возвращает первое значение AUTO_INCREMENT,
которое было установлено с помощью самой последней инструкции INSERT или
UPDATE, которая повлияла на столбец AUTO_INCREMENT.
SESSION_USER - MySQL функция SESSION_USER возвращает имя пользователя и имя хоста для текущего
пользователя MySQL.
SYSTEM_USER - MySQL функция SYSTEM_USER возвращает имя пользователя и имя хоста для текущего
пользователя MySQL.
USER - MySQL функция USER возвращает имя пользователя и имя хоста для текущего пользователя MySQL.
VERSION - MySQL функция VERSION возвращает версию базы данных MySQL.