BETWEEN is a unique operator in Oracle. Let me show you a small example of this: SELECT It is very easy to understand the above query as it returns all the employees who earn salaries between 1000 and 3000 (both inclusive). Let us rewrite the above query as follows: SELECT I just replaced 1000 with a simple sub-query using “dual.” If you are new to the “dual” table, please refer to my first article in this series. Let us work a bit more practically as follows: SELECT We can even work a bit differently. Let us go through the following query: SELECT The above gives you the salary grade of the highest salary!
blog comments powered by Disqus |