patternsqlCritical
Transform all columns records to lowercase
Viewed 0 times
lowercasecolumnsallrecordstransform
Problem
I'm using PostgreSQL 9.1 and I have a users table with a
login names are case-sensitive, for example Bob, MikE, john. I would like to transform all these records into lowercase. How can I do that?
login column. login names are case-sensitive, for example Bob, MikE, john. I would like to transform all these records into lowercase. How can I do that?
Solution
You can do this:
Refer to www.postgresql.org/docs/9.1/static/functions-string.html
UPDATE table_name SET column=lower(column)Refer to www.postgresql.org/docs/9.1/static/functions-string.html
Code Snippets
UPDATE table_name SET column=lower(column)Context
StackExchange Database Administrators Q#27410, answer score: 59
Revisions (0)
No revisions yet.