LOWER (Transact-SQL)
将大写字符数据转换为小写字符数据后返回字符表达式。
语法
LOWER ( character_expression )
参数
返回类型
varchar 或nvarchar
示例
以下示例将使用 LOWER 函数、UPPER 函数,并将 UPPER 函数嵌套在 LOWER 函数中,选择价格在 $11 到 $20 之间的产品名称。
USE AdventureWorks2008R2;
GO
SELECT LOWER(SUBSTRING(Name, 1, 20)) AS Lower,
UPPER(SUBSTRING(Name, 1, 20)) AS Upper,
LOWER(UPPER(SUBSTRING(Name, 1, 20))) As LowerUpper
FROM Production.Product
WHERE ListPrice between 11.00 and 20.00;
GO
下面是结果集:
Lower Upper LowerUpper
--------------------- --------------------- --------------------
minipump MINIPUMP minipump
taillights - battery TAILLIGHTS - BATTERY taillights - battery
(2 row(s) affected)