DF216: User defined-function name begins with ‘fn_’.

The topic describes the DF216 T-SQL code analysis rule.

Category

NAMING CONVENTIONS

Message

User defined-function name begins with ‘fn_’.

Description

It is recommended to avoid using the ‘fn_’ prefix for user-defined function names, as this prefix is commonly reserved for system functions.

Noncompliant code example

CREATE FUNCTION dbo.fn_DemoFunction(@x INT)
     RETURNS INT
AS
BEGIN
    RETURN @x + @x
END
GO

Compliant solution

CREATE FUNCTION dbo.udf_DemoFunction(@x INT)
     RETURNS INT
AS
BEGIN
    RETURN @x + @x
END
GO

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for SQL Server?