thstart
thstart

Reputation: 427

How to combine two tables so the new one to have only new records from the first and all the rest from the second?

I have table A with 1 million records and a table B with 10 million records. Table A can have new records not present in table B. How I can combine the two tables so the table C to have all the records from A and all the records from B but with updated records from A. Both tables A and B have a column ID by which both can be joined.

Upvotes: 0

Views: 50

Answers (1)

Rubén C.
Rubén C.

Reputation: 1098

You have to run a query and follow these instructions.

I would construct the query using the Join clause. For example:

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID; 

Find a detailed explanation for the different types of Joins in BigQuery here.

Upvotes: 1

Related Questions