Cascading Style vs River Style
Cascading Style
Cascading formatting is a style of SQL code formatting where each major SQL clause (e.g., SELECT, FROM, WHERE) is placed on a new line, and the elements within those clauses are indented consistently. The result is a „river-like“ appearance where the code flows vertically down the page, resembling cascading text.
Example
This formatting style emphasizes readability and clarity, especially for complex SQL queries. By structuring SQL statements in this manner, developers can quickly distinguish between different parts of the query and follow the logical flow without needing to scan horizontally.
River Style
River formatting is a style of SQL code formatting where key elements of a query (such as column names, conditions, and values) are aligned along vertical axes. This creates a tabular-like appearance, making it easy to visually scan and compare elements within the query. The goal is to achieve a clean, organized layout that emphasizes alignment and symmetry.
Example
This formatting style is particularly useful for structured environments where SQL queries are written to be consistently formatted across a team or organization.
Switch between Cascading Style & Axis River Style with one click