文档注释功能参数

时间:2018-01-26 08:47:19

标签: sql sql-server

我想知道如何给用户提供建议"通过intellisense获取SQL Server 2016中用于自创函数的不同输入参数(描述某个变量代表什么):

USE [XXXXXXXX]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:      XXXXXX
-- Create date: 2018-01-12
-- Description: --------------------XXxxxxx
-- =============================================
CREATE FUNCTION [XXX].[RemoveStringBetween] 
(
    @string VARCHAR(MAX),   -- input string
    @first INT,             -- position of first character of substring to be removed
    @second INT             -- position of last character of substring to be removed
)
RETURNS VARCHAR(max)
AS
BEGIN
    DECLARE @res VARCHAR(MAX)

    SET @res = (SUBSTRING(@string, 0, @first) + SUBSTRING(@string, @second + 1, LEN(@string) - @second));

    RETURN @res;
END
GO

0 个答案:

没有答案