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 SYSTEM_USER

January 4, 2024
| No Comments
| MySQL

In MySQL, the SYSTEM_USER() function is a built-in system function that returns the current MySQL user name and hostname. It doesn’t require any arguments and is typically used to identify the current user accessing the MySQL database. The function is equivalent to the USER() function and SESSION_USER() function, which also return the current user information. […]

Read More »

MySQL SESSION_USER

January 4, 2024
| No Comments
| MySQL

The SESSION_USER() function in MySQL is used to retrieve the current user and host name for the MySQL session. It returns a string in the format ‘user_name’@’host_name’, indicating the user and host associated with the current session. Syntax Here is the syntax for the SESSION_USER() function: SESSION_USER() Example Now, let’s look at an example to […]

Read More »

MySQL USER

January 4, 2024
| No Comments
| MySQL

In MySQL, the USER() function is used to retrieve the current user name and host name combination that is used to authenticate to the MySQL server. This function can be helpful in various scenarios, such as auditing or logging, where you need to track which user is executing certain SQL statements. Syntax Here is the […]

Read More »

MySQL SCHEMA

January 4, 2024
| No Comments
| MySQL

In MySQL, the SCHEMA() function is a built-in function that returns the current database name as a string. It is a synonym for the DATABASE() function and is used to determine the active database within a MySQL session. The function returns a UTF-8 encoded string representing the current database name. If no database has been […]

Read More »

MySQL ROW_COUNT

January 4, 2024
| No Comments
| MySQL

The ROW_COUNT() function in MySQL is used to obtain the number of rows affected by the last statement that directly or indirectly modifies a table. This can be particularly useful in scenarios where you want to know the number of rows affected by an INSERT, UPDATE, or DELETE statement. Syntax Here is the basic syntax […]

Read More »

MySQL DATABASE

January 4, 2024
| No Comments
| MySQL

The DATABASE() function in MySQL is a simple and straightforward function that returns the name of the current database. It does not require any parameters and can be used within SQL statements to dynamically reference the current database. Syntax The syntax for the DATABASE() function is as follows: DATABASE() Example Let’s consider a simple example […]

Read More »

Posts pagination

Previous 1 … 7 8 9 … 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.