MySQL command to convert a string to lowercase

by Sanju 2010-01-13 12:17:58

MySQL command to convert a string to lowercase

In MYSQL we have a command LOWER() which help us to convert a string to lowercase.

For Example:

We have MYSQL database of keywords that are presently mixed-case. If we want to convert them all to lowercase we can use the command LOWER().

1.
UPDATE table_name SET col_name=LOWER(col_name);


2.
SELECT LOWER('SANJESH');

Result:
sanjesh


3.
SELECT LOWER(column_name) FROM table_name;


Tagged in:

1305
like
0
dislike
0
mail
flag

You must LOGIN to add comments