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

  • Home
  • SEARCH
  • 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 6566907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:16:21+00:00 2026-05-25T14:16:21+00:00

I want to collectively some fields to the same value if they meet the

  • 0

I want to collectively some fields to the same value if they meet the criteria in my where clause. So instead of the following:

    UPDATE Table1
SET Column1 = Value1, Column2 = Value2
WHERE Some_Column = Some_Value

I need to do something like:

    UPDATE Table1
SET Column1, Column2 WHERE Some_Column = Some_Value
  • 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-05-25T14:16:22+00:00Added an answer on May 25, 2026 at 2:16 pm

    I am assuming you are trying to chain assignments as is possible in languages like C# where you can do x = y = z = 4; to set multiple variables to the same value.

    The UPDATE grammar in MySQL is below

    UPDATE [LOW_PRIORITY] [IGNORE] table_reference
        SET col_name1={expr1|DEFAULT} [, col_name2={expr2|DEFAULT}] ...
        [WHERE where_condition]
        [ORDER BY ...]
        [LIMIT row_count]
    

    It does not support this. You need to repeat the expression

    UPDATE Table1
    SET Column1 = expr, Column2 = expr
    WHERE Some_Column = Some_Value
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code will display 3 inline-block elements, collectively centered. I want to display
want to know why String behaves like value type while using ==. String s1
My team and I are working on several projects that collectively depend on some
Want make a mind map like the following: Image link is not available anymore.
Want to attach an Event Handler/Listener to some links using the delegate() method, but
I have a varying number of inline-block divs that I want to collectively take
Want to set up mysql master-slave replications in rails app. Are there plugins/db adapters
Want to forward the following: localhost/bla/index.html -> localhost/index.php?s=bla/index.html localhost/blub.html -> localhost/index.php?s=blub.html localhost/blog.html?site=10 -> localhost/index.php?s=blog.html&site=10
I am getting trouble with the following matter.Let's say, I have some string in
I'm creating a Wordpress plugin for collectively managing a Twitter account. I want to

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.