Something like this should do it :
UPDATE table1
SET table1.Price = table2.price
FROM table1 INNER JOIN table2 ON table1.id = table2.id
You can also try this:
UPDATE table1
SET price=(SELECT price FROM table2 WHERE table1.id=table2.id);
More Related Contents:
- Stored Procedure with optional “WHERE” parameters
- How do I list all the columns in a table?
- What’s the correct name for an “association table” (a many-to-many relationship) [closed]
- Is there a combination of “LIKE” and “IN” in SQL?
- SQL – How to store and navigate hierarchies?
- Can a foreign key be NULL and/or duplicate?
- Emulate MySQL LIMIT clause in Microsoft SQL Server 2000
- Multiplication aggregate operator in SQL
- SQL: Repeat a result row multiple times, and number the rows
- How do I decide when to use right joins/left joins or inner joins Or how to determine which table is on which side?
- MySQL equivalent of DECODE function in Oracle
- Deferrable Constraints in SQL Server
- Benefits Of Using SQL Ordinal Position Notation?
- How do I specify date literal when writing SQL query from SQL Server that is linked to Oracle?
- Unordered results in SQL
- How do I create a table alias in MySQL
- Backup SQL Schema Only?
- Connecting to Oracle Database using Sql Server Integration Services
- Why in SQL NULL can’t match with NULL?
- Is there an Oracle equivalent to SQL Server’s OUTPUT INSERTED.*?
- I need help formatting inner join command in SQL query
- Search All Fields In All Tables For A Specific Value (Oracle)
- How to get next/previous record in MySQL?
- SQL transpose full table
- How to Create a real one-to-one relationship in SQL Server
- How does GROUP BY work?
- How do I start auto increment from a specific point?
- How to use a dynamic parameter in a IN clause of a JPA named query?
- Perform regex (replace) in an SQL query
- Group consecutive rows of same value using time spans