sqlfluff / sqlfluff

A modular SQL linter and auto-formatter with support for multiple dialects and templated code.

Home Page:https://www.sqlfluff.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Enforcing Oracle "/" and T-SQL "GO" Commands

DanielC000 opened this issue · comments

Search before asking

  • I searched the issues and found no similar issues.

Description

This issue concerns the introduction of linting rules that enforce the use of database-specific command terminators, specifically the Oracle "/" and T-SQL "GO" commands.

Use case

In the context of Oracle and T-SQL, the "/" and "GO" commands play a critical role in signaling the end of a batch or block of statements to the SQL processor. Their correct usage is essential for the proper execution of scripts, especially when they contain multiple statements or commands that need to be executed independently.

  • Enhanced Script Reliability: By enforcing the use of "/" in Oracle and "GO" in T-SQL through linting, developers can avoid runtime errors caused by the SQL processor misinterpreting the end of command batches. This is particularly crucial in complex scripts where the boundary between statements is not clear-cut.

  • Improved Code Consistency: Consistently using these terminators across a project helps maintain code quality and readability, making it easier for developers to understand the structure and flow of SQL scripts.

Dialect

Oracle and T-SQL

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct