开发者

Switch to lower case across all entries in a mySQL tabel field

Is there a way to force all entries in a particular field to be lower case across an entire table in one comma开发者_StackOverflownd?


UPDATE table SET column = LOWER(column);


It sounds like you want a statement to force a column's alpha characters to be all lower cased.

UPDATE MyTable
SET MyColumn = LOWER(MyColumn)


You can change all the data after the fact with an update:

update `your_table` set column=lower(column);

But as far as forcing this upon insert Im not sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜