Hello - trying to create a SQL trigger that runs only on row updates, not row deletes. Below is my trigger code, but this is running on both and I'm not having success getting it to only run on actual updates only.
ALTER trigger [dbo].[clearPrimaryLocations] on [dbo].[ProviderLocations]
declare @updatedRow int, @providerId int
set @updatedRow = (select providerlocationid from deleted)
set @providerId = (select providerid from deleted)
set isPrimary = 0
where providerId = @providerId and providerLocationId <> @updatedRow