From the course: Querying Microsoft SQL Server 2019

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

String functions

String functions - SQL Server Tutorial

From the course: Querying Microsoft SQL Server 2019

Start my 1-month free trial

String functions

- [Instructor] String functions are used to manipulate text values that are stored in a data table. Let's take a look at a couple by first writing a simple query that pulls out the first and last name columns from the Person.Person table. This query returns all the people that are in this table. In fact, let's go ahead and space this out a little bit. I'll just put these first name and the last name lines on two different lines so that it's easier to read. Now, let's process all of these names to convert their cases. I'm going to do that by creating a third column here. The UPPER function will return text converted to all upper-case letters. I'll apply it to the values in the FirstName column. Let's also give this column an alias. I'll call it AS UpperCase. There's also a built-in function called LOWER, which will return a string that's all lower-case letters. Let's apply this one to the LastName values. I'll call this AS…

Contents