Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2012
    Posts
    4

    Unanswered: Update a field with data from another field, same table, is it possible?

    Hello:
    Wanted to make sure the following command is correct:

    update TABLEA set FIELD2 = FIELD1, FIELD4 = FIELD3;

    Is this command will copy the data from field1 to field 2 and field3 to field4, on ALL the rows in the table?. or viceversa?

    I could not find in the DB2 books an explanation of this command.

    DB2 V9.5.7 AIX64

    Thanks


  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Field2 will be set to field1 and field4 will be set to field3. On all rows.

    Andy

Posting Permissions

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