When an insert operation occurs on a SQL Server table, an insert trigger is fired. Within the trigger a cursor is opened and data is retrieved row by row from the inserted table. The retrieved rows are permutated and inserted into a couple of other tables.
The question is: Should the global variable @@error be checked after each insert operation within the trigger, and if an insert operation within the trigger fails, should the trigger issue a rollback (if rollback is desired) or should the cursor be closed and simply return from the trigger?
In summary, does the insert error within the trigger automatically trickle up out of the trigger and rollback the transaction under which the insert trigger was fired, or does the trigger need to take some explicit action to initiate (or suppress) a rollback?