From the course: Intermediate SQL: Data Reporting and Analysis
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Wildcards and aliases - SQL Tutorial
From the course: Intermediate SQL: Data Reporting and Analysis
Wildcards and aliases
- [Instructor] Now we start to make our queries more flexible. Wild cards let you place filters that are similar to but not exactly the same as your filter term. And table or column aliases can help to simplify more complex queries. Let's compare two queries. Select star from film where description is drama. Now we get zero results, an empty results set. Let's just have a quick look if we go back and look at all of the results. Here is an example of the description field. A epic drama of a feminist. Okay, so it's compared that to the word film and found nothing. Now, what if we say select star from film where description like drama? Now, it's found 106 results. The percent sign here is a wild card. It's like a joker in a pack of cards. It can stand for any number of other characters. SQL uses two wild cards; the percent sign and the underscore. The percent sign is more accommodating than the underscore. Let's just…
Contents
-
-
-
-
The basic SELECT query1m 57s
-
(Locked)
Aggregated results with GROUP BY1m 51s
-
(Locked)
Wildcards and aliases6m
-
(Locked)
Merging tables with JOIN3m 56s
-
(Locked)
Use string functions8m 6s
-
(Locked)
Use number functions with grouped data6m 46s
-
(Locked)
Use date functions6m 7s
-
(Locked)
Challenge: Report average cost by staff53s
-
(Locked)
Solution: Report average cost by staff1m 49s
-
-
-
-
-