如何在sql select语句中创建一个大写或小写的字段?
例:
从Person中选择firstname
如何使名字始终返回大写,同样总是返回小写?
SELECT UPPER(firstname) FROM Person SELECT LOWER(firstname) FROM Person
分别为LCASE或UCASE.
例:
SELECT UCASE(MyColumn) AS Upper, LCASE(MyColumn) AS Lower FROM MyTable
SQL SERVER 2005:
print upper('hello'); print lower('HELLO');