title: How to auto-update a SQL table when a change is made in another table?
body: <p>I have an Events Management System database with some entities. Two of them are Events and Tickets. In Events, I have maxTickets which holds the maximum number of tickets for an event. My problem is that how do I add those number of "maxTickets" for a particular event in the Tickets table? I have made the EventID as a foreign key to the Tickets table.</p>
  
  <p>I have tried using a trigger but can't understand how to execute it "maxTicket" number of times to insert tickets in the Tickets Table.</p>
  
  <p>Thank you for you help.</p>