How to restrict NULL as parameter to stored procedure SQL Server?

前端 未结 5 1542
孤独总比滥情好
孤独总比滥情好 2020-12-09 14:52

Is it possible to create a stored procedure as

CREATE PROCEDURE Dummy 
    @ID INT NOT NULL
AS
BEGIN
END

Why is it not possible to do somet

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-09 15:12

    One reason why you may need such syntax is that, when you use sp in C# dataset GUI wizard, it creates function with nullable parameters if there is no null restriction. No null check in sp body helps it.

提交回复
热议问题