Showing posts with label SQL RAISERROR pass parameter. Show all posts
Showing posts with label SQL RAISERROR pass parameter. Show all posts

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