1 2 3 4 5 6 > >>   ∑:321  Sort:Rank

BENCHMARK() - Repeating Expression Evaluation
How to evaluate an expression repeatedly for benchmark testing using the BENCHMARK() function? BENCHMARK(count, exp) is a MySQL built-in function that evaluates an expression repeatedly for benchmark testing and returns 0. For example: SELECT BENCHMARK(1000000, AES_ENCRYPT('hello','goodbye') );-- +-...
2024-07-17, 365🔥, 2💬

💬 2024-07-17 Iqra Technology: This is a great overview of the `BENCHMARK()` function in MySQL! Your examples clearly illustrate how it can be used to evaluate...

MySQL Functions on System Information
Where to find reference information and tutorials on MySQL database functions on System Information? I want to know how to use DATABASE(), VERSION() and other functions. Here is a collection of reference information and tutorials on MySQL database functions on System Information compiled by FYIcente...
2024-07-15, 349🔥, 0💬

CRC32() - Cyclic Redundancy Check 32-Bit
How to calculate the 32-bit CRC (Cyclic Redundancy Check) value using the CRC32() function? CRC32(str) is a MySQL built-in function that calculates the 32-bit CRC (Cyclic Redundancy Check) value of a given character string and returns it as an integer. For example: SELECT CRC32('MySQL'), HEX(CRC32('...
2024-07-15, 336🔥, 0💬

CURRENT_ROLE() - Current Role of Logged-In User
How to obtain the current role of the logged-in user using the CURRENT_ROLE() function? CURRENT_ROLE() is a MySQL built-in function that returns the current role of the logged-in user. For example: SELECT CURRENT_ROLE(); -- +----------------+ -- | CURRENT_ROLE() | -- +----------------+ -- | NONE | -...
2024-07-15, 333🔥, 0💬

CONNECTION_ID() - Thread ID of Current Connection
How to obtain the connection ID of the current connection using the CONNECTION_ID() function? CONNECTION_ID() is a MySQL built-in function that returns the connection ID of the current connection. The connection ID is also referred as thread ID or process ID. For example: SELECT CONNECTION_ID(); -- ...
2024-07-15, 332🔥, 0💬

Removed: PASSWORD() - Generating Password Hash
How to convert a password into a hash value with the default hashing algorithm using the PASSWORD() function? PASSWORD(password) is a MySQL built-in function that converts a password into a hash value with the default hashing algorithm. Note that PASSWORD() is no longer supported. It was: Introduced...
2024-05-15, 440🔥, 0💬

Window Functions
What Are Window Functions? A Window Function is a function that can perform calculations over a window of rows referenced from the current row in query result. A window function is called with a OVER clause in the following syntax: window_function(...) OVER window where window is one of the followin...
2024-05-15, 428🔥, 0💬

MySQL Functions on Result Set Windows
Where to find reference information and tutorials on MySQL database functions on Result Set Windows? I want to know how to use FIRST_VALUE(), ROW_NUMBER() and other window functions. Here is a collection of reference information and tutorials on MySQL database functions on Result Set Windows compile...
2024-05-15, 374🔥, 0💬

CUME_DIST() - Cumulative Distribution of Sorted Values
How to calculate the cumulative distribution of the sorting field expression in the current result set window using the CUME_DIST() function? CUME_DIST() is a MySQL built-in window function that calculates the cumulative distribution of the sorting field expression in the current result set window. ...
2024-05-15, 355🔥, 0💬

Removed: ENCRYPT() - Unix crypt() Hash Algorithm
How to generate a hash value with the Unix crypt() algorithm using the ENCRYPT() function? ENCRYPT(bytes) is a MySQL built-in function that generates a hash value with the Unix crypt() algorithm. Note that ENCRYPT() is no longer supported. It was: Introduced MySQL 4.0. Removed in MySQL 8.0. Related ...
2024-05-15, 340🔥, 0💬

RELEASE_LOCK() - Release Lock Instance
How to release an instance of a given lock associated with the current connection session using the RELEASE_LOCK() function? RELEASE_LOCK(lock) is a MySQL built-in function that releases an instance of a given lock associated with the current connection session. It returns 1 if released Successfully...
2023-12-20, 362🔥, 0💬

RELEASE_ALL_LOCKS() - Release All Locks
How to release all locks associated with the current connection session using the RELEASE_ALL_LOCKS() function? RELEASE_ALL_LOCKS(lock) is a MySQL built-in function that releases all locks associated with the current connection session. It returns the number of locks released. For example: SELECT GE...
2023-12-20, 402🔥, 0💬

IS_USED_LOCK() - Checking Lock Owner
How to check the owner of a user defined lock using the IS_USED_LOCK() function? IS_USED_LOCK(lock) is a MySQL built-in function that returns the connection id the lock associated with if the lock is in use, NULL otherwise. For example: SELECT GET_LOCK('MyLock', 60), IS_USED_LOCK('MyLock'); -- +----...
2023-12-20, 341🔥, 0💬

GET_LOCK() - Requesting User Defined Lock
How to request a user defined lock using the GET_LOCK() function? GET_LOCK(lock, timeout) is a MySQL built-in function that tries to obtain a user defined lock within a timeout period. It returns 1 if successful, 0 if failed. For example: SELECT GET_LOCK('MyLock', 60), IS_FREE_LOCK('MyLock'), IS_USE...
2023-12-20, 437🔥, 0💬

IS_FREE_LOCK() - Checking Lock Status
How to check the status of a user defined lock using the IS_FREE_LOCK() function? IS_FREE_LOCK(lock) is a MySQL built-in function that returns 1 if a given user lock is free, 0 otherwise. For example: SELECT GET_LOCK('MyLock', 60), IS_FREE_LOCK('MyLock'); -- +------------------------+---- -----------...
2023-12-20, 347🔥, 0💬

MAKE_SET() - Filtering List with Binary Set
How to filter a list of strings with a binary set provided as an integer using the MAKE_SET() function? MAKE_SET(bits, str1, str2, ...) is a MySQL built-in function that filters a list of strings with a binary set provided as an integer. It loops through every bit of the given integer "bits" startin...
2023-12-20, 447🔥, 0💬

EXPORT_SET() - Exporting Binary Set to On/Off Flags
How to export an integer as a binary set to on/off flags using the EXPORT_SET() function? EXPORT_SET(bits, on, off, delimiter, len) is a MySQL built-in function that converts an integer as a binary set (a sequence of bits) to on/off flags. It loops through every bit of the given integer "bits" start...
2023-12-20, 361🔥, 0💬

SLEEP() - Holding Statement Execution
How to hold the statement execution for some time using the SLEEP() function? SLEEP(sec) is a MySQL built-in function that holds the execution of the current statement for sec seconds. For example: SELECT SYSDATE(), SLEEP(2), SYSDATE(); -- +---------------------+------- ---+---------------------+-- ...
2023-12-19, 395🔥, 0💬

NULLIF() - NULL on Equal Values
How to generate NULL with equal values using the NULLIF() function? NULLIF(val1, val2) is a MySQL built-in function that returns NULL if the first argument equals the second, the first argument otherwise. For example: SELECT NULLIF('yes', 'yes'), NULLIF('yes', 'no'); -- +----------------------+-----. ..
2023-12-19, 394🔥, 0💬

LEAST() - Finding the Least/Minimum Value
How to find the least (minimum) value of a given list of values using the LEAST() function? LEAST(val1, val2, ...) is a MySQL built-in function that returns the least (minimum) value of a given list of values. For example: SELECT LEAST(70, 89, 73, 99, 101, 110, 116, 101, 114); -- +------------------...
2023-12-19, 387🔥, 0💬

JSON_VALID() - Validating JSON Value
How to verify if value is a JSON (JavaScript Object Notation) value using the JSON_VALID() function? JSON_VALID(val) is a MySQL built-in function that returns 1 if the given value is a valid JSON value. For example: SELECT JSON_VALID('hello'), JSON_VALID('"hello"'); -- +---------------------+------- ...
2023-12-17, 334🔥, 0💬

JSON_QUOTE() - Quoting JSON String
How to convert a regular character string into a JSON (JavaScript Object Notation) string using the JSON_QUOTE() function? JSON_QUOTE(str) is a MySQL built-in function that converts a regular character string into a JSON string by quoting the string with double quotes. It replaces the double-quote c...
2023-12-10, 447🔥, 0💬

JSON_PRETTY() - Validating JSON Value
How to encode a JSON (JavaScript Object Notation) value into a pretty-printing string using the JSON_PRETTY() function? JSON_PRETTY(json) is a MySQL built-in function that encodes a JSON (JavaScript Object Notation) value into a pretty-printing string. For example: SELECT JSON_PRETTY('["a",1,{"key1"...
2023-12-10, 376🔥, 0💬

IS_UUID() - Validating UUID String Format
How to validate a UUID (Universal Unique IDentifier) string using the IS_UUID() function? IS_UUID(uuid) is a MySQL built-in function that validates a UUID (Universal Unique IDentifier) string. It only checks if the given UUID is a 32-digit hexadecimal string or not. For example: SELECT IS_UUID('447f...
2023-12-08, 412🔥, 0💬

1 2 3 4 5 6 > >>   ∑:321  Sort:Rank