Minus in oracle => http://farbadeftnist.nnmcloud.ru/d?s=YToyOntzOjc6InJlZmVyZXIiO3M6MjE6Imh0dHA6Ly9iaXRiaW4uaXQyX2RsLyI7czozOiJrZXkiO3M6MTU6Ik1pbnVzIGluIG9yYWNsZSI7fQ== Furthermore is will give the corrent result. The two queries do not need to use the same column names. What is a Minus Query? You can get personalized Oracle training by Donald Burleson, right at your shop! The corresponding expressions in the select lists of the component queries of a compound query must match in number and must be in the same datatype group such as numeric or character. Hi Tom, Thanks for your response. Feel free to ask questions on our. To make the result set, the database system performs two queries and subtracts the result set of the first query from the second one. Kudos to you for great and sometimes funny answers. Oracle has quite sophisticated query rewrite capabilities, and transforming set operation into join is one of them. If you are not the addressee you may not copy, forward, disclose or use any part of it. I want the intersection of Table1 and Table2 depends on Loc, Sec, Deg. Therefore, if the corresponding expressions of component queries resolve to both character data and numeric data, Oracle returns an error. If you find an error or have a suggestion for improving our content, we would appreciate your feedback. There are 3 records in Table1 with 7000 so another one will show in output i. All set operators have equal precedence. UNION, INTERSECT, and MINUS SQL Operations - If there is no difference, there is no remaining result set. Please go through and tell me whether we can achieve the result with an sql statement and how to do it. Kudos to you for great and sometimes funny answers. I do not have records for people who died more than 2 years ago since Feb 28. Hi Tom, I have a problem and have to solve as early as possible. Any successions will be appreciated. Hi Tom, Thanks for your response. I want the intersection of Table1 and Table2 depends on Loc, Sec, Deg. There are 3 records in Table1 with 7000 so another one will show in output i. I want output only that records which are not common between the tables. A minus is going to be a big sort distinct on top of something minus in oracle a hash anti-join. But depends on what you need for they return different answers. Hi Tom, It is my humble opinion that you should filter all the questions that come through. I mean you are minus in oracle feeding the users. I beleive that if the user community understands the value of this site and makes a better use of it, everyone will be happy. Thanks Hi Tom, I have got three tables. Some of the address id's are orphans. I wrote the following query to get the orphans. Am I doing something wrong here?.