Lalit Raghav
A product table has a record of product. Table has only one record and this product accessing three user.First user has purchased product then how restrict second use to update that record.
By Lalit Raghav in SQL Server on Sep 11 2018
  • Amit Phadtare
    Oct, 2018 22

    Use timestamp column which will keep track of record version, while placing the order use this timestamp value as a part of your stock update statement.

    • 2
  • kevin shah
    Oct, 2018 1

    You need to create Order table in which there will be entry for that product with quantity and user who has purchased that product. And for another users who are trying to purchase that product we can check from Order table with Product table to check available quantity.

    • 2
  • mukul agrawal
    Sep, 2018 29

    you can try to introduce a flag of purchase in product table, as soon as user has purchased and that flag will be true and after that you can restrict the other user to updated.

    • 2

Most Popular Job Functions