I have multiple updates and insert statements in a procedure.
Please refer below example:
Procedure Example
--code
Update 1
insert 1
Update 2
Update 3 --Suppose exception occurs
Now i want to rollback to before 1st update statement means no update or insert affects.
====== edit ==========
Working example: http://sqlfiddle.com/#!4/b94a93/1
You can catch exception in exception when clause and execute rollback statement, e.g.
try
** note the BEGIN END block