Earlier, I posted the solution to copy one column to another in SQL.
Now, what if one wants to change the column to uppercase in the database table?
Well, there’s UPPER() function that you can use directly to change the column to uppercase.
The upper() function converts all the letters in a string into uppercase.
For example, you have an online store where customers fill the form to sign up. As everyone is not the same, some of the mandatory fields like email addresses or country name may have a variety of inputs.
However, when you are managing the customer data from the database, you want all the email addresses in lower case or the country name in uppercase.
Doing it manually does not make sense, but you can use the SQL upper() function to change the column to uppercase!
The below example shows how to use SQL uppercase in the database.
Use of SQL Upper function:
Example: Change the column values to uppercase
UPDATE indiacity SET city = UPPER(city);
Using this query, you can change the column values to upper case.
If you have any doubts about the solution, please mention them in the Comments section below. I’d be glad to help you out.
Also, do not forget to share it using social media.
Get Weekly Updates
Never miss Magento tips,tricks,tutorials,and news.
Thank you for subscribing.
Something went wrong.