Updating a Table from another Table Newbie

Discussion in 'Databases' started by webboy, Jan 29, 2008.

  1. #1
    OK did it

    UPDATE `TABLE FROM` , `TABLE TO`

    SET `TABLE FIELD TO` = `TABLE FIELD FROM`
    WHERE `TABLE FIELD FROM` = `TABLE FIELD TO`

    Yeppieeeee
     
    webboy, Jan 29, 2008 IP
  2. sharqi

    sharqi Guest

    Messages:
    105
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    UPDATE table SET foo WHERE value IN (SELECT bar FROM othertable WHERE somevalue = 'something')
     
    sharqi, Jan 30, 2008 IP