From the course: Oracle Database 19c: Basic SQL

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

WHERE clause syntax

WHERE clause syntax

From the course: Oracle Database 19c: Basic SQL

Start my 1-month free trial

WHERE clause syntax

- [Instructor] Let's get started with the WHERE clause of the SELECT statement and go over the basics of the WHERE clause, and what you can do there, one word answer filtering. The Oracle syntax for the WHERE clause is really straightforward. It's the WHERE keyword, always after the end of the SELECT or DML statement, regardless of how many other clauses are in the SELECT or DML statement. It contains the keyword WHERE, plus a condition. Well, what's in the condition? Quite a bit actually. You can compare columns to each other, see if columns are null, use BETWEEN to see if a value is between two other values and do pattern matching. The IN or EXISTS clause means that you will have another sub query or at least a list of values. Compound expressions include one or more and or OR conditions. You can use LIKE or other built in functions like pattern matching with regexp. Remember, when the conditions in the WHERE clause are true for any given row, that row will be returned when running…

Contents