SQL changing a value to upper or lower case

谁都会走 提交于 2019-12-02 19:54:56
SELECT UPPER(firstname) FROM Person

SELECT LOWER(firstname) FROM Person
Stephen Wrighton

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
Xyed Xain Haider

You can do:

SELECT lower(FIRST NAME) ABC
FROM PERSON

NOTE: ABC is used if you want to change the name of the column

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!