Is it possible to make a trigger after triggering, for example, display the deleted element automatically, that is, after the triggering operation, a query is immediately launched for the example SELECT c_warehouse_id FROM counterparts Which output the deleted element or inserted by the same analogy?
Here is a trigger
CREATE TRIGGER delete_tiger_test ON WareHouse_DB.dbo.counterparts AFTER DELETE AS BEGIN DECLARE @c_qty as INT, @c_warehouse_id as INT SELECT @c_qty = i.qty FROM deleted i; SELECT @c_warehouse_id = i.warehouse_id FROM deleted i; UPDATE warehouse SET warehouse.income_qty = warehouse.income_qty - @c_qty FROM Counterparts WHERE warehouse.id = @c_warehouse_id PRINT 'TRIGGER [delete_tiger_test] worked' END If this can be implemented then how?
PRINT 'TRIGGER [delete_tiger_test] worked'would just output the query - j. Atisto