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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dharmraj ThakurPosted Jan 8, 2018, 12:48 AM
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
sourabh choubeyPosted Jan 7, 2018, 9:59 AM
Dharmraj ThakurPosted Jan 6, 2018, 12:00 AM