From the course: SQL for Non-Programmers

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Matching data with wildcards

Matching data with wildcards - SQL Tutorial

From the course: SQL for Non-Programmers

Matching data with wildcards

There are various ways to match data in SQL according to certain criteria. We have seen the use of the WHERE clause and the CASE statement, which both allow you to input specific criteria and search for matches in your data. For example, you can filter for data pertaining only to the state of Florida or create categories based on employee tenure. Up until now, though, we have been performing this match operation with exactness, saying that data must be exactly equal to our criteria. Wildcards in SQL allow you to perform matches on your data using a form of estimation, searching for values that match a certain pattern or have specific characters in common. Wildcards are special characters that represent one or more other character values. The two most commonly used wildcards are the percent symbol and the underscore symbol. This is easiest to understand with an example. Let's jump over to SLS. Our management team at Two Trees Olive Oil is back and would like to know how much each of…

Contents