Skip to content
Advertisement

Oracle FETCH FIRST 1 ROW with UNION ALL statement

I’m trying to create a UNION ALL statement in SQL using the FETCH FIRST 1 ROW however when I do that it gives me an error MISSING KEYWORD

Here’s what my SQL looks like:

is something like this doable. I would like to keep this as a single statement rather than adding a SUBQUERY or anything of that nature.

Advertisement

Answer

Just put each part in parentheses. Works in 12.2, anyway:

My actual test query, for anyone interested was this:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement