开发者

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

开发者 https://www.devze.com 2023-03-24 14:06 出处:网络
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);

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

精彩评论

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