title: On executing a query in table A a column in table B must increment its value by 1 or update its value as 2
body: <p>Im working on a project where i need to assign the vehicle number that is currently free  to a customer who needs a cab. So vehicle status would change from 1 to 2 upon assigning.</p>
  
  <p>Now this vehicle status is in vehicledetails table.Vehicle number is getting updated in tripdetails table.</p>
  
  <p>when i assign the free vehicle i'm actually updating it to tripdetails table.</p>
  
  <p>Im not able to understand how to increase the tripstatus from 1 to 2 automatically in vehicledetails table upon assigning the vehicle to customer.</p>
  
  <p>Please show me some directions or any kind of help would be appreciated. </p>