Click here to Skip to main content
15,867,835 members
Please Sign up or sign in to vote.
1.11/5 (2 votes)
How we can raise error in Stored procedure IN MS SQL?
Can anybody suggest me.
Thanks
Posted
Comments
Santosh K. Tripathi 6-Nov-15 10:03am    
may i know, why you want to raise error? what is purpose of this?

SQL
RAISERROR ('Error Message',16, 1) 


16 is the ErrorSeverity
1 is the ErrorState
 
Share this answer
 
Comments
Pravin Patil, Mumbai 13-Sep-11 6:16am    
Good answer..
Santosh K. Tripathi 6-Nov-15 10:04am    
why we need to raise error? example please?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900