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.
Example 2: Use UPPER function with all lower case characters in an expression. In this example, we use a string with Upper function, and it converts all letters in the string to uppercase. SELECT UPPER('learn sql server with sqlshack'); Output: It converts all characters for a string.
The intellisense/autocompletion in Microsoft SQL Server Management Studio allows either upper or lower case for reserved words, but upper cases function calls like MAX(), SUM().
SELECT UPPER(firstname) FROM Person
SELECT LOWER(firstname) FROM Person
LCASE or UCASE respectively.
Example:
SELECT UCASE(MyColumn) AS Upper, LCASE(MyColumn) AS Lower
FROM MyTable
SQL SERVER 2005:
print upper('hello');
print lower('HELLO');
You can use LOWER function
and UPPER function
. Like
SELECT LOWER('THIS IS TEST STRING')
Result:
this is test string
And
SELECT UPPER('this is test string')
result:
THIS IS TEST STRING
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With