Soft technology web class: SQLServer of UCASE () function

UCASE () function

UCASE function converts the value of the field to uppercase.

SQL UCASE () syntax

	SELECT UCASE(column_name) FROM table_name

SQL UCASE () example

We have the following "Persons" table:

Id LastName FirstName Address City
1 Adams John Oxford Street London
2 Bush George Fifth Avenue New York
3 Carter Thomas Changan Street Beijing

Now we want to choose content "LastName" and "FirstName" column, and then the "LastName" column to uppercase.

We use the following SQL statement:

	SELECT UCASE(LastName) as LastName,FirstName FROM Persons

The result set will look like this:

LastName FirstName
ADAMS John
BUSH George
CARTER Thomas

Original link: http: //www.sysoft.top/Article.aspx ID = 3739?

Guess you like

Origin www.cnblogs.com/sysoft/p/11582407.html