最后,如何在SSMS中将空值传递给存储过程?我已经将我的两个参数设置为可选的。
--This is inside my storedproc @name varchar(50) @surname varchar(50) = null, @text varchar(255) = null,
现在执行
--Now execute without the 'text' EXEC sp_bla 'Noob Question Name', 'Noob Surname'
Oscar.. 5
EXEC sp_bla NULL, 'Noob Question Name', 'Noob Surname'
基本上,只需在所需位置传递NULL作为参数值
EXEC sp_bla NULL, 'Noob Question Name', 'Noob Surname'
基本上,只需在所需位置传递NULL作为参数值