Skip to content
No results
  • SQL Pretty Printer
  • General SQL Parser Tutorial
  • Data Lineage Tool
We use cookies to ensure that we give you the best experience on our website.
SQL Pretty Printer
SQL and DATA

SQLFlow Data Lineage Tool

  • SQL Pretty Printer
  • General SQL Parser Tutorial
  • Data Lineage Tool
SQL Pretty Printer
SQL and DATA

Oracle SQL Query rewrite

This article includes a list of Oracle SQL rewrite rules to improve sql performance, with the help of General SQL Parser, those SQL query rewrite can be done automatically.

1. (NOT) IN sub-query to (NOT) EXISTS sub-query

2. (NOT) EXISTS sub-query to (NOT) IN sub-query

3. Separate outer joined inline view using UNION ALL or add hint for the inline view

4. IN clause to UNION ALL statement

5. OR clause to UNION ALL statement

6. NVL function to UNION ALL statement

7. Re-write suppressed joined columns in the WHERE clause

8. VIEW expansion

9. NOT EXISTS to NOT IN hash anti-join

10. Make columns suppressed using RTRIM function or ‘+0’

11. Add hint to the statement

12. Co-related sub-query to inline View

Download this demo: C# version

Gudu SQLFlow

Posts

  • Why Your DataHub BigQuery Lineage Silently Breaks on Procedural SQL — and How to Fix It
    April 18, 2026
  • Analyzing Oracle PL/SQL Dependencies Before Your Snowflake Migration
    April 6, 2026
  • GSP vs JSQLParser vs sqlglot — SQL Parser Comparison 2026
    April 6, 2026
  • Why Most SQL Lineage Tools Skip Stored Procedures (And What You Can Do About It)
    April 5, 2026
  • Understanding SQLFlow Job: Automate Your Data Lineage Analysis at Scale
    February 5, 2026


List of demos illustrate how to use general sql parser

Copyright © 2026 - Gudu Software