Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    some relations between the tables? How can one know which record from sale corresponds to which record from ud? Is it based on id as primary key in both tables? Commented Aug 18, 2009 at 11:43
  • How can you update UD? It only has the assid and it's own ID. Could you give an example in terms of actual values that exist, and the records you would like changed or added as a result of the script? Commented Aug 18, 2009 at 11:43
  • 4
    See also SO question ... stackoverflow.com/questions/982919/sql-update-query-using-joins Commented Jun 14, 2013 at 14:48
  • 2
    User Alias in query like stackoverflow.com/questions/982919/sql-update-query-using-joins Commented Aug 15, 2017 at 11:46
  • UPDATE s SET s.Age = s.Age + 1 FROM Students s INNER JOIN StudentsData sd ON s.ID = sd.ID; Commented Nov 9 at 22:20