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()
Return the current version of the MySQL database:
SELECT VERSION();
The VERSION() function returns the current version of the MySQL database, as a string.
VERSION()
Return the weekday index for a date:
SELECT DAYOFWEEK("2017-06-15");
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
Convert the text to lower-case:
SELECT LCASE("SQL Tutorial is FUN!");
The LCASE() function converts a string to lower-case.
Note: The LOWER() function is a synonym for the LCASE() function.
LCASE(text)
Parameter | Description |
---|---|
text | Required. The string to convert |
Works in: | From MySQL 4.0 |
---|
Convert the text in “CustomerName” to lower-case:
SELECT LCASE(CustomerName) AS LowercaseCustomerName
FROM Customers;