Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL query to make all data in a column UPPER CASE?

Tags:

sql

uppercase

I need a SQL query to make all data in a column UPPER CASE?

Any ideas?

like image 647
MetaGuru Avatar asked May 13 '09 15:05

MetaGuru


People also ask

How do you make all letters uppercase in SQL?

UPPER() : This function in SQL Server helps to convert all the letters of the given string to Uppercase. If the given string contains special characters or numeric values, then they will remain unchanged by this function.

Why is SQL all uppercase?

SQL was developed in the 1970s when the popular programming languages (like COBOL) used ALL CAPS, and the convention must have stuck. Show activity on this post. It's because that is the way it is defined in the ANSI standard.

How do you change uppercase to lowercase in SQL?

How to Convert Uppercase to Lowercase in SQL Server – LOWER() In SQL Server, you can convert any uppercase string to lowercase by using the LOWER() function. Simply provide the string as an argument when you call the function, and it will be returned in lowercase form.

How do you find lowercase and uppercase in SQL?

Case insensitive SQL SELECT: Use upper or lower functionsselect * from users where lower(first_name) = 'fred'; As you can see, the pattern is to make the field you're searching into uppercase or lowercase, and then make your search string also be uppercase or lowercase to match the SQL function you've used.


1 Answers

Permanent:

UPDATE   MyTable SET   MyColumn = UPPER(MyColumn) 

Temporary:

SELECT   UPPER(MyColumn) AS MyColumn FROM   MyTable 
like image 192
Tomalak Avatar answered Sep 20 '22 15:09

Tomalak