Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Location
    Mars
    Posts
    137

    Thumbs up Unanswered: Update one table with value from other table

    I have two tables named onsite and operations. I want to update one table with the value from other table. I can use something like this in MySQL 4.0.

    update onsite o, operations p set o.username = p.username where o.userid = p.userid;

    Can any one tell me how to do this in SQL Server.

    Thnks in advance
    Sudar

    --
    My Blog

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    update o set o.username=p.username from onsite o,operations p where o.userid = p.userid

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •