04 Oct 19 ·  nVector in Snowflake ·        Bookmark ·  Report ·  More actions.. Lock comments ·  Pin thread

Update command syntax in Snowflake

Updates specified rows in the target table with new values.

UPDATE Inventory
SET quantity = quantity - 10
WHERE product like '%washer%';

To update a table from another table:

UPDATE Inventory i
SET i.quantity = n.quantity
FROM (
select quantity,product from NewArrivals
)n
WHERE i.product = n.product;

nVector

posted on 04 Oct 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds