i need some help with creating a trigger to run a qf.stored_procedure when a qf.table is created. AT the moment, i have a job t run the stored procedure every 15 minutes but changing that is not an option.
The idea is for the trigger to run the stored procedure whenever the table is updated regardless of whether its a single row or all. As well am not sure whether to create it in triggers under the table or Database triggers?. i want the script to check if the trigger exist and if it doesn't then create it.
table name: qf.customer_working_hours
columns: WHours_id,DayOFW
Stored Procedure: qf.ServiveRefreshCustomer_WH
Am new to SQL scripting and SQL triggers, any help will be appreciated
UPDATE
and also any time someone runsALTER TABLE
? Can you give some details about what the stored procedure does? Does it need to have some understanding of what row(s) were affected, or does it just blindly process every single row in the table even if only one row was touched?