Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8408893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:45:26+00:00 2026-06-09T23:45:26+00:00

Very simple question, is it possible to write an Oracle update statement like this

  • 0

Very simple question, is it possible to write an Oracle update statement like this with column names and values grouped together?

UPDATE table_name SET (column1, column2, column3) = (value1, value2, value3)

The reason I’m asking is because I’m writing a script to migrate a lot of data and for insert statements I have a string containing all the column names and a string containing all the values. I need to write an update statement for the same data and was wondering if there’s an alternative to having to write it all out again in a different format!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:45:27+00:00Added an answer on June 9, 2026 at 11:45 pm

    Not directly as you wrote it, but you can do it like this:

    UPDATE table_name 
       SET (column1, column2, column3) = (select 1 as value1, 'foo' as value2, 'bar' as value3 from dual);
    

    So a multi-column update is only supported when using a sub-select for the “value”.

    You might also want to look into the MERGE statement:

    merge into table_name 
    using
    ( 
       select 1 as id, 
              'foo' as value1,
              'bar' as value2
       from dual
    ) t on (t.id = table_name.id)
    when matched then update
      set value1 = t.value1,
          value2 = t.value2
    when not matched then 
       insert (id, value1, value2)
       values (t.id, t.value1, t.value2);
    

    If that row exists it will be updated, if not it will be inserted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this may be a very simple question, but is it possible to force a
I have a very simple question: Is it possible to change the price of
This is a very simple question. I often find myself wanting to create a
This is a very simple question: I have a string defined in my C#
This might be a very simple question but didn't yield any results when searching
Very simple question... I have an array of pixels, how do I display them
Very simple question: Specifically in Python (since Python actually has strongly recommended style guidelines
Very simple question. I need to perform a task when the user closes his
Very simple question, I made the following program : #include <stdlib.h> int main(int argc,
Very simple question. What does the term 'seeding' mean in general? I'll put the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.