Hi, I want to update the id field of a table at the time of bulk insertion in another table using trigger.
Hi Deepak, create a for update trigger on the table A and right your loggic to Updated Table B so when the Table A is updated your table B will automatically gets updated.
If you're using the BULK INSERT command, note that you have to include the FIRE_TRIGGERS option to make the triggers fire. If you don't, they don't fire.
Please check Books Online if you have any doubts about syntax. You don't say if you are indeed using the BULK INSERT command, so it's difficult to say if this is the issue that you're facing. If you're using a regular INSERT INTO query, and the trigger is not firing, then the trigger might have been disabled. In SQL 2005, you can check the icon for the trigger in the object browser - it's different if the trigger is disabled. If the trigger is disabled, find out why it is.