Rajanikant Hawaldar
How do I UPDATE from a SELECT in SQL Server?

How do I UPDATE from a SELECT in SQL Server?

By Rajanikant Hawaldar in SQL Server on Oct 10 2020
  • Ehasanul Hoque
    Oct, 2020 14

    UPDATE [OrderItem]SET IsPaid=O.IsPaidFROM OrderItem AS OIINNER JOIN Order AS OON OI.OrderId=O.ID

    • 2
  • Varun Setia
    Oct, 2020 14

    The UPDATE from SELECT query structure can be achieved by using JOIN along with UPDATE query. Here, for reference we are referring to columns that we want to update in one side of join and on other side we will reference the same table with WHERE clause.

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS