Answer the question
In order to leave comments, you need to log in
How to write a MS SQL trigger that adds a record to a table?
It is required to write a trigger to add 2 records to the ProductDetails table.
"
create trigger qwe
on ProductDetails
for insert
as
if @@rowcount = 0
return
set nocount on
update ProductDetails
set ID, Color, [Description]
from ProductDetails
Answer the question
In order to leave comments, you need to log in
Create trigger [mysterious trigger for a mysterious table]
on [mysterious table]
for delete, update, insert
as
begin
insert ProductDetails (id, Color, Description)
select top 2 id, 'Color', 'Description'
from Products
ebd
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question