MySQL VERSION Function

Example

Return the current version of the MySQL database:

SELECT VERSION();

Definition and Usage

The VERSION() function returns the current version of the MySQL database, as a string.

Syntax

VERSION()

Continue reading MySQL VERSION Function

MySQL DAYOFWEEK Function

Example

Return the weekday index for a date:

SELECT DAYOFWEEK("2017-06-15");

Definition and Usage

The DAYOFWEEK() function returns the weekday index for a given date (a number from 1 to 7).

Note: 1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday, 6=Friday, 7=Saturday. Continue reading MySQL DAYOFWEEK Function

MySQL LCASE Function

Example

Convert the text to lower-case:

SELECT LCASE("SQL Tutorial is FUN!");

Definition and Usage

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

Note: The LOWER() function is a synonym for the LCASE() function.

Syntax

LCASE(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 LCASE(CustomerName) AS LowercaseCustomerName
FROM Customers;