HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlCritical

Transform all columns records to lowercase

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
lowercasecolumnsallrecordstransform

Problem

I'm using PostgreSQL 9.1 and I have a users table with a 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:

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.