From the course: Microsoft SQL Server 2016: Query Data

Unlock the full course today

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

Queries using character data types

Queries using character data types - SQL Server Tutorial

From the course: Microsoft SQL Server 2016: Query Data

Start my 1-month free trial

Queries using character data types

- [Instructor] In this lesson, we're going to take a look at queries using character data types. We've already covered the wildcard characters a little bit earlier in one of our previous lessons, but we're going to expand a little bit in this lesson on the character data types, and how we can manipulate our query results using the specific wildcard characters and character ranges to actually return values. The first query that we're going to execute is a simple one, it's just selecting the first and last name from the person table, and we're looking for the last name of Adams. But you might notice that we're using the letter N as a prefix in front of the result that we're actually searching for, so our predicate value. This prefix designator is just used to reflect Unicode data types. And it tells SQL Server that we want to use Unicode because we know our data is stored as Unicode. So it's kind of a signal that tells SQL Server to not worry about doing any typecasting or conversion of…

Contents