Reputation: 1357
I have an sql database (from an expressionengine install.)
Within the exp_channel_data
table I have a column field_id_90
that contains only text values. The problem is all these values are in CAPITALS.
Ideally I would like them lowercase.
Is it possible to run a query or something to change these?
--UPDATED--
Thank you for the responses. Just wondering about whether or not its possible to Capitalise the values? Most of the values are single words, but some are "word,word" and some are "word-word" Is that possible?
Upvotes: 2
Views: 613
Reputation: 15047
Lets make my comment an answer:
UPDATE table_name SET field_id_90=LCASE(field_id_90)
LCASE can also be known as LOWER in some languges
Upvotes: 1
Reputation: 70728
Use LOWER
(SQL Server)
SELECT LOWER(Column)
FROM Table
Or LCASE
(MySQL)
SELECT LCASE(Column)
FROM Table
Upvotes: 1
Reputation: 1175
Yes it is. Use LCASE()
or LOWER()
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lcase
Upvotes: 1
Reputation: 238106
lower()
should work for SQL Server, MySQL, Oracle and PostgreSQL:
select lower(YourColumn)
from YourTable
Upvotes: 1