Create a trigger to fill a field according to acondition in sql
0
votes
1
answer
1281
views
I want to create a trigger to fill a field according to acondition as below description
For example:
I have a table for all insps that have attachments named: “inspectionAttachments” and I have another table “inspections” that contains all insps and I want to fill for example column/field named “shop” in the inspections table to define which insps that have attachments or not
So, I want to fill the shop field with Yes if at least this insp has one attachment and fill this field with No if there is no attachement
How I can write the trigger to make what I want
Thanks for any help 😊
Best,
Lubna

Asked by lubna.najeh
(1 rep)
Feb 22, 2021, 09:59 AM
Last activity: Nov 8, 2024, 09:02 AM
Last activity: Nov 8, 2024, 09:02 AM