create TRIGGER [dbo].[TR_AddBarcodefromShenaseh] ON LinkKala_Unit AFTER INSERT AS BEGIN begin insert into An_BarCodeKala (codekala,barcode) select b.code,b.shenaseh from inserted a inner join kala b On b.code=a.CodeKala end END