• Hi,

    The CATCH clause in SQL server does exactly what a catch(Exception ex) in C# does. Also the ROLLBACK is perfectly valid; imagine what would happen if there was no TRY.. CATCH within the given sample code. In that case after opening a transaction, there would be a divide by zero error and this is analogous to an error in the transaction which would eventually result in it's roll back.