The topic describes the DF088 T-SQL code analysis rule.
STYLE
Code contains an unused label.
To improve code maintainability and avoid confusion, it is recommended to remove labels, which are declared, but not used.
Unused labels serve no purpose and can mislead others into thinking that they are relevant to the code’s functionality. Removing such labels helps streamline the code, making it cleaner, easier to understand, and less prone to errors.
CREATE OR ALTER PROCEDURE dbo.DemoProcedure
AS
BEGIN
SELECT
*
FROM dbo.DemoTable
ExitLabel:
END
GO
CREATE OR ALTER PROCEDURE dbo.DemoProcedure
AS
BEGIN
SELECT
*
FROM dbo.DemoTable
END
GO