Skip to content
Advertisement

Tag: common-table-expression

‘WITH’ clause does not work with in operator

I have a simple query: It should create a MaxSal temporary table and then in the WHERE section it should check whether the Salary, DepId are inside said table. Unfortunately, this query gives me ORA-00920: invalid relational operator which I guess is referring to the in operator. If I put the Sub-query directly instead of first putting it in a

How to go convert to CTE

I am a little confused out a CTE works. I need to convert my statement from a rollup with a UNION to a CTE… but the CTE is a bit confusing me. Any Ideas how to approach this? Answer You can express this using a CTE as:

Advertisement