Oracle 18c:
Using an SQL query, I want to generate square grid graph features:

The underlying vertices would look like this:
STARTPOINT_X STARTPOINT_Y ENDPOINT_X ENDPOINT_Y SHAPE
------------ ------------ ---------- ---------- ----------
0 0 1 0 [SHAPE] --horizontal lines
1 0 2 0 [SHAPE]
2 0 3 0 [SHAPE]
3 0 4 0 [SHAPE]
4 0 5 0 [SHAPE]
5 0 6 0 [SHAPE]
...
0 0 0 1 [SHAPE] --vertical lines
0 1 0 2 [SHAPE]
0 2 0 3 [SHAPE]
0 3 0 4 [SHAPE]
0 4 0 5 [SHAPE]
0 5 0 6 [SHAPE]
...
[220 rows selected]
Details:
- The lines would be split at each intersection. So, in the image above, there are 220 lines. Each line is composed of two vertices.
- Ideally, I would have the option of specifying in the query what the overall grid dimensions would be. For example, specify this somewhere in the SQL: DIMENSIONS = 10 x 10 (or DIMENSIONS = 100 x 100, etc.).
- To keep things simple, we can:
- Assume the grid's overall shape will always be a square (length = width).
- For the purpose of this question, we can make the cell size 1 unit.
- And the grid can start at 0,0 and be built "up and right" (to the northeast).
- I've supplied sample data in this db<>fiddle (non-spatial XY coordinates). I created that data using Excel.
- Hint: The vertical grid lines start at row 111.
The reason I want to generate this data is:
I want sample line data to work with when testing Oracle Spatial queries. Sometimes I need a few hundred lines. Other times, I need thousands of lines. And I need to share the data online via https://dbfiddle.uk, so I can't use real/proprietary GIS data.
Also, if the lines are in a grid pattern, then it will be obvious if any lines are missing in my analysis results (by looking for gaps in the data in a map).
I'm aware that there are ways to do this with ArcGIS tools. In this case, I want to do it using SQL.
How can I generate those grid lines using Oracle SQL?