From the course: Oracle Database 12c: Basic SQL
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Using WHERE to filter partial strings - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
Using WHERE to filter partial strings
- [Instructor] We are not only restricted to filtering our data using numbers, we can also filter based on certain string values. So for example, instead of asking the database to return all employees who has a certain salary, or are assigned to specific departments based on the department number, let's see how we can return all employees whose first name start with the letter E. So let's delete the WHERE condition, keeping the WHERE keyword, and type first_name like, which can be lowercase or uppercase, similar to other reserved word in our SQL query, and then specify the condition. So for example, if I want all employees whose first name starts with the letter E, I'll type LIKE, add a quotation mark, because I'm going to filter based on string values characters instead of numbers, the letter E and then the percentage symbol, followed by another quotation mark. This instructs Oracle to search for rows where the value in the first name column starts with the letter E. The percentage…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Writing your first SELECT query1m 56s
-
(Locked)
Selecting only specific columns2m 22s
-
(Locked)
Using WHERE to filter specific rows1m 55s
-
(Locked)
Using multiple WHERE conditions3m 55s
-
(Locked)
Using WHERE to filter partial strings3m 12s
-
(Locked)
Using WHERE to filter numeric ranges1m 17s
-
(Locked)
Using WHERE IN and NOT IN for strings1m 54s
-
(Locked)
Using WHERE IN and NOT IN for numbers1m 35s
-
(Locked)
Using WHERE to filter dates2m 42s
-
(Locked)
Using WHERE to filter exact strings1m 55s
-
(Locked)
Using DISTINCT to eliminate duplicates4m
-
(Locked)
Performing basic numeric calculations2m 23s
-
(Locked)
Using column aliases2m 18s
-
(Locked)
Describe the structure of a table3m 16s
-
(Locked)
Using ORDER BY3m 29s
-
-
-
-
-
-
-