Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a MySQL command to convert a string to lowercase?

Tags:

php

mysql

People also ask

How do I convert a string to lowercase in MySQL?

MySQL LOWER() Function The LOWER() function converts a string to lower-case. Note: The LCASE() function is equal to the LOWER() function.

How do I convert a string to lowercase?

Java String toLowerCase() Method The toLowerCase() method converts a string to lower case letters. Note: The toUpperCase() method converts a string to upper case letters.

How do you change uppercase to lowercase in SQL?

How to Convert Uppercase to Lowercase in SQL Server – LOWER() In SQL Server, you can convert any uppercase string to lowercase by using the LOWER() function. Simply provide the string as an argument when you call the function, and it will be returned in lowercase form.

How do you Uncapitalize a string?

lower() Return value lower() method returns the lowercase string from the given string. It converts all uppercase characters to lowercase. If no uppercase characters exist, it returns the original string.


UPDATE table SET colname=LOWER(colname);

Yes, the function is LOWER() or LCASE() (they both do the same thing).

For example:

select LOWER(keyword) from my_table

SELECT LOWER(foo) AS foo FROM bar


You can use the functions LOWER() or LCASE().

These can be used both on columns or string literals. e.g.

SELECT LOWER(column_name) FROM table a;

or

SELECT column_name FROM table a where column = LOWER('STRING')

LCASE() can be substituted for LOWER() in both examples.


Did you try looking it up? Google, manual...

http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_lower

mysql> SELECT LOWER('QUADRATICALLY');
        -> 'quadratically'