Selecting all top-level rows of a table in SQL Navigator

I have a table with an email address column. Some email addresses in the table contain uppercase letters. I would like to get all the uppercase strings (to set them to lowercase). How to select all lines in which the email address contains uppercase letters?

+4
source share
1 answer

I believe Oracle is case sensitive by default ? If so, then this should work:

SELECT * FROM table_name WHERE LOWER(email) <> email 

If this works, you can simply update them with

 UPDATE table_name SET email = LOWER(email) WHERE LOWER(email) <> email 
+5
source

Source: https://habr.com/ru/post/1444074/


All Articles