Any one expert in writting stored procedure sql query while insert update and delete record i want t use try ,catch and finally block with rollback transaction and commit sql statement .
Please send me the struectur by an example
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dharmraj ThakurRank #577 · 4.2K reputationPosted Jan 5, 2018, 7:00 PM EST
sourabh choubey23 reputationPosted Jan 7, 2018, 4:59 AM EST
Dharmraj ThakurRank #577 · 4.2K reputationPosted Jan 7, 2018, 7:48 PM EST
This option specifies the setting for ANSI NULL comparisons. When this is on, any query that compares a value with a null returns a 0. When off, any query that compares a value with a null returns a null value.
QUOTED IDENTIFIER ON/OFF:
This options specifies the setting for usage of double quotation. When this is on, double quotation mark is used as part of the SQL Server identifier (object name). This can be useful in situations in which identifiers are also SQL Server reserved words.
Mode:
This is a just a parameter to identiy what to do like insert, update or delete... You put more modes in same stored procedure.
SET NOCOUNT ON;
When SET NOCOUNT is ON, the count is not returned. When SET NOCOUNT is OFF, the count is returned.
I used to think that 9 row(s) affected was returned from server in plain text but it doesn't seem to be the case. It's in fact a small message packet called DONE_IN_PROC.
Finally block:
https://stackoverflow.com/questions/13054101/finally-clause-in-sql-server-transaction-something-that-will-execute-irrespecti