Skip to content

MySQL Tutorial

Learn MySQL

Menu
  • Home
  • Data types
  • Functions
    • Aggregate Functions
    • Cast Functions
    • Comparison Functions
    • DATE Functions
    • Flow Control Functions
    • Math functions
    • String Functions
    • Window Functions
    • REGEXP Functions
    • JSON Functions
    • XML Functions
    • Information Functions
    • Encryption Functions

Category: MySQL

Learn MySQL Tutorial

MySQL CURRENT_USER

January 4, 2024
| No Comments
| MySQL

The CURRENT_USER() function in MySQL is used to return the current user name and host name combination for the MySQL session. It is often employed to retrieve information about the user who is currently connected to the MySQL server. The function provides details in the format ‘user_name’@’host_name’. Syntax Here is the syntax for the CURRENT_USER() […]

Read More »

MySQL CURRENT_ROLE

January 4, 2024
| No Comments
| MySQL

In MySQL, the CURRENT_ROLE function is a built-in function that returns the current active roles for the current session. A role is a named collection of privileges that can be granted to users or other roles. The current role determines the access privileges that are available to the user for the current session. Syntax The […]

Read More »

MySQL CONNECTION_ID

January 4, 2024
| No Comments
| MySQL

The CONNECTION_ID function in MySQL is used to retrieve the connection ID (thread ID) for the current client session. Each client session that connects to the MySQL server is assigned a unique connection ID, which can be useful for various administrative and diagnostic purposes. Syntax The syntax for the CONNECTION_ID function is quite simple: CONNECTION_ID() […]

Read More »

MySQL JSON_OBJECTAGG

January 4, 2024
| No Comments
| MySQL

In the realm of MySQL database management, the JSON_OBJECTAGG function plays a crucial role in manipulating and aggregating JSON data. It facilitates the creation of JSON objects from key-value pairs extracted from specific columns. This function’s versatility extends to aggregating data based on group-by criteria, enabling the creation of comprehensive JSON representations of aggregated information. […]

Read More »

MySQL JSON_ARRAYAGG

January 4, 2024
| No Comments
| MySQL

The JSON_ARRAYAGG function in MySQL is used to aggregate values into a JSON array. It is particularly useful when you want to combine multiple rows of data into a single JSON array. This function was introduced in MySQL version 5.7.22. Syntax The basic syntax for the JSON_ARRAYAGG function is as follows: JSON_ARRAYAGG(expr) expr: The expression […]

Read More »

MySQL MEMBER OF

January 4, 2024
| No Comments
| MySQL

The MEMBER OF function in MySQL is used to determine whether a specified value is an element of a JSON array. It takes two parameters: value and json_array. The value parameter can be any valid JSON value, and the json_array parameter must be a valid JSON array. Syntax Here is the syntax for the MEMBER […]

Read More »

Posts pagination

Previous 1 … 8 9 10 … 39 Next

MySQL tutorial

  • MySQL Database
  • MySQL Create table
  • MySQL Insert
  • MySQL Update
  • MySQL Delete
  • MySQL Select
  • MySQL From
  • MySQL Where
  • MySQL Order By
  • MySQL Select distinct
  • MySQL AND
  • MySQL OR
  • MySQL IN
  • MySQL NOT IN
  • MySQL BETWEEN
  • MySQL LIKE
  • MySQL LIMIT
  • MySQL EXISTS
  • MySQL GROUP BY
  • MySQL HAVING
  • MySQL IS NULL
  • MySQL Joins
  • MySQL INNER JOIN
  • MySQL LEFT JOIN
  • MySQL RIGHT JOIN
  • MySQL CROSS JOIN
  • MySQL SELF JOIN
  • MySQL ROLLUP
  • MySQL Subquery
  • MySQL UNION
  • MySQL UNION ALL
  • MySQL EXCEPT
  • MySQL CASE
  • MySQL IF-THEN-ELSE

Recent Posts

  • MySQL SUBDATE function
  • MySQL STR_TO_DATE function
  • MySQL convert string to date
  • MySQL datetime format
  • MySQL create temporary table
  • MySQL current datetime
  • MySQL TRUNCATE
  • MySQL SHOW EVENTS
  • MySQL ALTER EVENT
  • MySQL DROP EVENT

© MySQL Tutorial 2025.