SQL Server 2012 begins by introducing a throw clause to replace the RAISERROR that has been used since SQL Server. Since the function is the same, it is all in try ... What is the difference between catch code blocks that do not catch errors and
The role of RAISERROR in the server database is the same as ASP. NET, like the throw new exception, is used to throw an exception or an error. This error can be captured by the program.Common formats for RAISERROR are as follows:RAISERROR ('
RAISERROR is made up of Word raise errorraise to increase or improve;The role of RAISERROR: RAISERROR is used to throw an error. [The following information is from the help of SQL Server 2005]Its syntax is as follows:RAISERROR ({msg_id | msg_str |
Reproduced to: http://hi.baidu.com/software_2008/blog/item/7d768731dde7ee11eac4af16.html
System pre-defined error code
SQL Server has 3831 predefined error codes, which are maintained in the master. dbo. sysmessages table. Each error code has a
Usage of RAISERROR in SQL Server
the role of RAISERROR: RAISERROR is used to throw an error . [The following information is derived from SQL Server 2005 Help]
The syntax is as follows:
RAISERROR ({msg_id | msg_str | @local_variable}
from: http://www.cnblogs.com/xugang/archive/2011/04/09/2010216.html RAISERROR is made up of Word raise errorraise increased; Improve ImproveThe role of RAISERROR: RAISERROR is used to throw an error. [The following information is from the help of
For a description of the error severity level of SQL Server, take a strong look at the following two linksOffline HelpMs-help://ms. Sqlcc.v9/ms. Sqlsvr.v9.zh-chs/sqlerrm9/html/3e7f5925-6edd-42e1-bf17-f7deb03993a7.htmOnline
During a stored procedure, the process handles some logical errors, such as: When converting RMB to USD, it is best to throw an exception in the stored procedure when you do not have to query the desired exchange rate, so that you can find the error
SQL Server raiseerror usage
RaiserrorReturn the User-Defined error message and set the system flag to record the error. By using the raiserror statement, the client can retrieve entries from the sysmessages table, or dynamically generate a message
System pre-defined error code
SQL Server has 3831 predefined error codes, which are maintained in the master. DBO. sysmessages table. Each error code has a corresponding level and description.The error definition level ranges from 0 to 25. More
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.