Click here to Skip to main content
15,915,636 members
Please Sign up or sign in to vote.
1.33/5 (2 votes)
See more:
hello Sir, I want to update Multiple rows in my sql table.. with records selected from other sql table. what is the way to update this records using sql query or stored procedure ?
Posted
Comments
Herman<T>.Instance 12-Aug-14 4:16am    
you can pick one choice. Result will be the same if the correct syntax is used...
jaket-cp 12-Aug-14 4:44am    
sql query should do what you need.
Without the tables and data in your question it is hard to help out any more.
But you should be able to perform the update with a join.

You can use a combination of join and update together.
For e.g
SQL
UPDATE
    tableA
SET
    A.columnA = B.ColumnA
FROM
    tableA A 
    JOIN
    tableB B ON A.columnB = B.columnB
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900