Results 1 to 3 of 3

Thread: update syntax for same table update

  1. #1
    Join Date
    Oct 2002
    Posts
    2

    Smile update syntax for same table update

    How do I write an update query to update a column in TabA with the information from other records in TabA?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    join the table with itself (self join) and update the columns you want with the rows you want.

    look in books online for UPDATE, there are examples which can guide you.

  3. #3
    Join Date
    Aug 2003
    Location
    Naples, FL
    Posts
    6
    Depends on what you really need.

    update table1 set column1 = 'joe' where column2 = 'smoe'

    You might post what you need to get more detailed help.

    HTH

Posting Permissions

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