SQL function as default parameter value?

前端 未结 6 512
孤城傲影
孤城傲影 2020-12-13 11:45

I tried changing a default parameter value with this:

ALTER PROCEDURE [dbo].[my_sp]
@currentDate datetime = GETDATE()

and all the SQL pre-c

6条回答
  •  情歌与酒
    2020-12-13 12:20

    Suggestion:

    Set the default to NULL

    Do the Default GETDATE() in the front end.

提交回复
热议问题