Hi ! i have some questions about a transaction in the trigger, for which I haven't found an answer yet.
CREATE TRIGGER A_AI ON A
AFTER INSERT AS
BEGIN TRY --is the try block 1 transaction ? or do I have to begin the transaction?
--BEGIN TRAN: may I start the transaction like this?
-- SOME DANGEROUS OPERATIONS
COMMIT --has this sense here?
END TRY
BEGIN CATCH --silent catch no rasing errors.
ROLLBACK TRANSACTION -- does it work without BEGIN TRANSACTION? if so, is it the whole try block?
END CATCH
GO