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?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityI'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?
You can do this:
UPDATE table_name SET column=lower(column)
Refer to www.postgresql.org/docs/9.1/static/functions-string.html
UPDATE table_name SET column = LOWER(column) WHERE column != LOWER(column);
will do.
– Fabien Snauwaert
Mar 28 '18 at 13:38
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
while trying this.
– Surya
Oct 11 '19 at 7:13