SQL USER_NAME Function

Example

Return the database user name (will return the current user since no id is specified):

SELECT USER_NAME();

Definition and Usage

The USER_NAME() function returns the database user name based on the specified id.

If no id is specified, this function will return the name of the current user.

Syntax

USER_NAME(id_number)

Continue reading SQL USER_NAME Function

SQL LOG10 Function

Example

Return the base-10 logarithm of 2:

SELECT LOG10(2);

Definition and Usage

The LOG10() function returns the natural logarithm of a number to base 10.

Note: Also look at the LOG() function.

Syntax

LOG10(number)

Continue reading SQL LOG10 Function