Sql statement required for copy txt from one table filed to another table field

Discussion in 'MySQL' started by nkurahatti, Aug 25, 2008.

  1. #1
    Hi to all,


    I wanted to copy some data from one table field to another table field. (php/mysql) by using sql statement

    There are 2 tables named Inventory & Purchase

    Inventory table fields -
    Model No, Model Name, Qty

    Purchase table fields –
    Model No, Model Name, Qty


    If I add 5 in Qty field of Purchase table
    It should add 5 qty to Qty (inventory table)

    I just need simple sql statement for this


    Thanks in advance

    Narayan
     
    nkurahatti, Aug 25, 2008 IP
  2. The Universes

    The Universes Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could do something like this:
    Thats probably not exactly what you want and its probably easier just to do those extra inserts/updates.
     
    The Universes, Aug 26, 2008 IP