How to validate the parameters in the stored procedure in SQL Server i.e. whether the parameter value is correct or not, and return that invalid parameter back with query,
CREATE PROCEDURE Sp_test
(@Para1 int,
@para2 bigint,
@para3 varchar)
If I pass string value to the int parameter or vice-versa, how to validate in the SQL Server side?
Or if there is a function for this to call for various parameters and datatype to check from the SQL Server side.
1条答案
按热度按时间sirbozc51#
With the Below function I have tried and I got the method in success , if it returns zero the process will error with the passed parameter.