sqloracle-databasetablename

Oracle SQL - Define table names for later usage?


I wanted to know if there is a way, in SQL Oracle, to do some range-definition (like in Excel). For example:

DEFINE TABLE1 = SELECT FIELD1, FIELD2, FIELD3 FROM [SCHEMA].[TABLE0][WHERE/GROUP BY/HAVING/ORDER BY/...];

DEFINE TABLE2 = SELECT FIELD1, FIELD2, FIELD3 FROM TABLE1 [WHERE/GROUP BY/HAVING/ORDER BY/...];

DEFINE TABLE3 = SELECT FIELD1, FIELD2, FIELD3 FROM TABLE2 LEFT JOIN TABLE1 ON [CONDITIONS];

SELECT * FROM TABLE3;

Thanks a lot in advance.


Solution

  • TO close this question. From one of the comments (Steve), what I needed is a WITH clause, as I didn't have DDL privileges.

    Thanks,