I create the trigger
CREATE TRIGGER InsertInOrderProducts ON OrderProducts FOR INSERT AS BEGIN IF ((SELECT inserted.quantity FROM inserted) > (SELECT Products.balance FROM Products WHERE Products.id = inserted.product_id)) BEGIN ROLLBACK TRAN PRINT 'Нет требуемого колличества товара' END END Mistake
Could not bind composite identifier "inserted.product_id". What am I doing wrong?