From the course: From Excel to SQL

Unlock the full course today

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

The LIKE operator in SQL

The LIKE operator in SQL

From the course: From Excel to SQL

Start my 1-month free trial

The LIKE operator in SQL

- [Instructor] So one operator you're going to find really useful when working with SQL, is the LIKE operator. And the LIKE operator allows you to search for patterns within a column. So to demonstrate this, I've set up a simple query that will search the employee's table for any employees matching a certain criteria. And for that criteria, we're going to use the LIKE operator. Now the LIKE operator is powerful and I'll demonstrate some of that power right now. So let's say you want to find all employees whose last name begins with a T. To do that, we'll write the where clause, like this. So where last name LIKE, and then in quotes, we'll put a T followed by the percent sign. The percent sign here represent zero, one, or multiple characters after the T. So when we run the query, we'll see that we get back employees, whose last name begin with T. We can also place multiple percent signs within a query. So if you…

Contents