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

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…

Contents