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 9238945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:52:35+00:00 2026-06-18T07:52:35+00:00

Given the query… UPDATE Table1 SET col1 = col1 + 1, col2 = col1

  • 0

Given the query…

UPDATE
   Table1
SET
   col1 = col1 + 1,
   col2 = col1 * 2
WHERE
   colID = 1

…if col1 equals 1 before the query is executed, will col2 be set to 2 or 4 after the query is executed?

  • 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-18T07:52:36+00:00Added an answer on June 18, 2026 at 7:52 am

    Just give it a try. But here you go:

    http://sqlfiddle.com/#!2/7b6de/1

    Col2 updates to 4.

    Good luck.

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

Sidebar

Related Questions

Given a query like: SELECT table1.field1 FirstField, table2.field2 SecondField FROM table1 INNER JOIN table2
I currently have a list of things to update in the given mysqli query:
I imagine a query like this. Movie.find_or_create_by_title(title: 'foo').photos.find_or_create_by_name(name: 'bar') The given query will create
How to store the result set of the given query in a new table.
How do I determine the isolation level in use for a given query? After
Given a query like the following: DELETE FROM FOO WHERE ID in (1,2,3,4,....); Is
Please explain the SQL query given below. I m new with SQL and struggling
I have a script which allows to display search results. Given a query there
Given the following query, how do I return the p_name with the most transactions?
Given the following query let $a := xs:dateTime(2012-01-01T00:00:00.000+00:00) let $b := xs:dateTime($a) let $c

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.