DECLARE @raiseErrorCode nvarchar(50)
SET @raiseErrorCode = CONVERT(nvarchar(50), YOUR UNIQUEIDENTIFIER KEY)
RAISERROR('%s INVALID ID. There is no record in table',16,1, @raiseErrorCode)
RAISERROR (
             N'This is message %s %d.', -- Message text,
             10,                        -- Severity,
             1,                         -- State,
             N'number',                 -- First argument.
             5                          -- Second argument.
          ); 
-- The message text returned is: This is message number 5.

 

相关文章:

  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-09
相关资源
相似解决方案