DF026: The schema name for procedure or function is not specified.
Last modified: December 25, 2024
The topic describes the DF026 T-SQL code analysis rule.
Category
BEST PRACTICE
Message
The schema name for a procedure or function is not specified.
Description
It is recommended to explicitly specify the schema when referencing a stored procedure or user-defined function.
Additional information
Explicitly stating the schema name helps prevent potential conflicts with objects in different schemas and enhances code readability. Additionally, specifying the schema can improve query performance by reducing the need for the database engine to resolve object references.
Noncompliant code example
SELECT * FROM DemoFunction()
DEClARE @result NVARCHAR(50)
EXEC @result = DemoProcedure
Compliant solution
SELECT * FROM dbo.DemoFunction()
DEClARE @result NVARCHAR(50)
EXEC @result = dbo.DemoProcedure
Was this page helpful?