From the course: Oracle Database 12c: Basic SQL
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using multiple WHERE conditions - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
Using multiple WHERE conditions
- [Instructor] We can also add additional conditions to the where clause of our SQL query. For example, let's say we also want to filter based on department ID. So before doing that, let's add the department ID column from the employees table to the select clause of our SQL query so that we can first see which employees are assigned to which departments in our organization. So I'll type comma department_id and run the query again. We can see that for the sub set of data that we have returned from the employees table, we have employees that have department ID 90, 100, 30, 80, 20, and 110. So let's add a second filter condition to our where clause. I can easily do that by typing and space. Note that I'm using uppercase letters in my select query, but lowercase letters would function just as well. I'm using uppercase letters for pure legibility purposes, nothing else. So going back to our query, I can type and…
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
-
-
-
-
-
-
-