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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:51:11+00:00 2026-06-12T08:51:11+00:00

I am completely new to bq, i have a question, regarding MATH functions. Suppose

  • 0

I am completely new to bq, i have a question, regarding MATH functions. Suppose i have a table called tab1 with A, B, C three cols. I want to write a query by which C’s values are replaced by the SUM(A+B) or A*B or something in a row-by-row basis. That means if the values of A = 2, B = 3 for the 1st row then C will be 5 and if the same is A = 4, B = 3 then C = 7 for the second row and so on.
I am just wondering if that is possible by writing one single query rather than visiting each row one by one and manually updating the values of C?

aiming to something like

UPDATE tab1 SET C = A+B

OR

UPDATE tab1 SET C = SUM(A,B)

Am I right in the thought process, is it possible?

  • 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-12T08:51:12+00:00Added an answer on June 12, 2026 at 8:51 am

    BigQuery tables are append-only, so you can’t run UPDATE queries.

    However, you could run a query like this:

    SELECT
      mother_age, father_age, mother_age + father_age
    AS age_sum
    FROM
      [publicdata:samples.natality]
    WHERE
      mother_age > 25 AND father_age > 25
    LIMIT 50;
    

    Result:

    +------------+------------+---------+
    | mother_age | father_age | age_sum |
    +------------+------------+---------+
    |         28 |         35 |      63 |
    |         27 |         42 |      69 |
    |         37 |         51 |      88 |
    |         38 |         37 |      75 |
    etc...
    

    and then save that result to a new table, or export it as a CSV file into Google Cloud Storage.

    Read about appending data to BigQuery tables, or saving a query result to a persistent table.

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

Sidebar

Related Questions

I am new to ASP.NET MVC and I have a question regarding viewing entity
I'm new to Android development and have some question regarding overlays in googlemaps API.
I'm new to Android development and have some question regarding overlays in googlemaps API.
I have silly question regarding Ajax and fancy box.i'm new to Ajax. i'm using
Completely new to java and I have been playing around with regex in a
I am completely new to HTML5 and have been reading about it for the
I am completely new bie to IIS. I have a very basic knowledge about
I am completely new to Xcode and iOS developing in general. Basically I have
I am completely new to android, and pretty much a Java newb. I have
I'm rusty in SQL and completely new to SQL Alchemy , but have an

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.