将列的所有值更新为小写 [英] Update all values of a column to lowercase
本文介绍了将列的所有值更新为小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
让我们说我有这样的事情
Lets say I have something like this
uid tag
1 HeLLo
2 heLLO
3 HELLO
4 hello
如何将标签"列中的所有值更新为:
How can I update all values in the "tag" column to:
uid tag
1 hello
2 hello
3 hello
4 hello
使用MySQL吗?
推荐答案
请参见 http://dev.mysql.com/doc/refman/5.0/zh-CN/string-functions.html#function_lower
UPDATE table_name SET tag = LOWER(tag)
这篇关于将列的所有值更新为小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文