SQL Stored Procedure preventing to write null

后端 未结 3 1529
灰色年华
灰色年华 2021-01-29 00:08

So, I\'ve got this below implemented in one of my stored procedures. And if they have less points as specified it works correctly but if they have normal points (not less) and t

3条回答
  •  借酒劲吻你
    2021-01-29 00:38

    If I'm understanding this correctly you could modify the ELSE.

    Change From:

    ELSE @NewPoint = @NewPoint
    

    Change To:

    ELSE return
    

    This will abort the script and no updates will occur.

提交回复
热议问题