Update of the table using another table



  • A table school

    введите сюда описание изображения

    and is the table newemails

    введите сюда описание изображения

    Objective - E-mail addresses from the table newemails in the school

    The point is, to deal with such tasks, I write a separate annex. But I think that's a standard SQL tool. Is there a possibility?



  • UPDATE s
       SET s.SchoolEmail = e.SchoolEmail
      FROM school s
     INNER JOIN newemails e
           ON   s.SchoolID = e.SchoolID
    



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2