MySQL DATABASE Function

Example

Return the name of the current (default) database:

SELECT DATABASE();

Definition and Usage

The DATABASE() function returns the name of the current database.

If there is no current database, this function returns NULL or “”.

Syntax

DATABASE()

Continue reading MySQL DATABASE Function

MySQL LOWER Function

Example

Convert the text to lower-case:

SELECT LOWER(“SQL Tutorial is FUN!”);

Definition and Usage

The LOWER() function converts a string to lower-case.

Note: The LCASE() function is equal to the LOWER() function.

Syntax

LOWER(text)

Parameter Values

Parameter Description
text Required. The string to convert

Technical Details

Works in: From MySQL 4.0

More Examples

Example

Convert the text in “CustomerName” to lower-case:

SELECT LOWER(CustomerName) AS LowercaseCustomerName
FROM Customers;