Question: Given the tables: Persons: ID, Name, Age. Students: ID, Persons_ID (Foreign key to the Persons table ID). In this case, if you add a

Given the tables: Persons: ID, Name, Age. Students: ID, Persons_ID (Foreign key

Given the tables: Persons: ID, Name, Age. Students: ID, Persons_ID (Foreign key to the Persons table ID). In this case, if you add a person in the Persons table, we want to add a row to the Students table if the person's age is between 18 and 25. Which of these queries in the Persons inserted trigger will make sure that a student record is added correctly? A. INSERT INTO Students (Person_ID) SELECT ID FROM Inserted WHERE Age BETWEEN 18 AND 25 B. INSERT INTO Students (ID) SELECT ID FROM Inserted WHERE Age BETWEEN 18 AND 25 C. INSERT INTO Students (Person_ID) FROM Inserted WHERE Age BETWEEN 18 AND 25 D. INSERT INTO Students (Person_ID) SELECT ID FROM Inserted WHERE Age IN (18, 25)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!