I've run a query in Oracle SQL Developer 18.
I want to share the resultset data on Stack Exchange in a format that's easy for answerers to grab and use.
From my experience, WITH clauses are preferred by Stack Exchange community members, since WITHs avoid the need to create data in a local Oracle environment.
- WITHs are also easy to paste into db<>fiddle.
Example:
with cte as(select 10 as asset_id, 1 as vertex_num, 118.56 as x, 3.8 as y from dualunion allselect 10 as asset_id, 2 as vertex_num, 118.62 as x, 1.03 as y from dualunion allselect 10 as asset_id, 3 as vertex_num, 121.93 as x, 1.03 as y from dual) --There are lots more rows. But it's too much work to write them all out.select * from cte
Back when I was using Toad 12 for Oracle, I remember having an export option for generating a WITH statement from a resultset. Which was really handy.
Is there equivalent functionality in SQL Developer — to automatically generate a WITH clause from the resultset? Or are we stuck writing WITH clauses manually?