adsense

Monday, February 20, 2023

SQL RAISERROR pass parameter




    If we want to parameterise SQL  RAISERROR  function  we can easily do that as display below.

 

DECLARE @Msg VARCHAR(100)

SET @Msg = 'Number exceeded on ' +FORMAT (getdate(), 'dd/MM/yyyy')

RAISERROR (@Msg , 16, 1) 


Cheers

Samitha

No comments:

Post a Comment