i am developing an inventry control database, how to update stock when we purchase and sell items, when we purchase new items it should be added to stock, similarly when we sell an item it should be detected from stock. i have written a sql update query which updates only one record, how to update all records