I have the following table with data
ID Seat_No Start_Station_No Start_Station_Name End_Station_No End_Station_Name
1 A01 1 'ABC' 10 'XYZ'
for example when someone updates this table as
Update SeatTable Set Start_Station_No=3,Start_Station_Name='CDE', End_Station_No=7, End_Station_Name='GHI' where ID=1;
Then the following two rows will be added in the same table upon update record trigger
ID Seat_No Start_Station_No Start_Station_Name End_Station_No End_Station_Name
2 A01 1 'ABC' 3 'CDE'
3 A01 7 'GHI' 10 'XYZ'
The station Names and ID's are kept in a separate table from where the system will pick Names.
Description: The seat is available from the station No 1 to Station No 10, but if someone will book the seat from station no 3 to 7, then two new seats will be created from 1 to 3 and 7 to 10. i wanted to this using triggers in database but not have enough knowledge to do this.