SQL Server

In mine blog, the dotDicas () I in general write articles on development .NET. Another day came until me a desenvolvedor, reading friend of mine blog, with a SQL doubt. Answered the question of my friend, I decided to write an article, to help other desenvolvedores that can come to have the same doubt. However mine blog is focado in development .NET, then I decided to look another space to publish my tip. With certainty, at some moment the majority of the desenvolvedores, that uses SQL Server, already was come across with necessity to bring up to date a register in a table, based on the value of a register in another table. Read additional details here: Peter Asaro. The ones that had not yet had this necessity, still will pass for this. will have the same doubt that I had: How I make this? The reply it is very simple. Update with inner join is alone to make one, thus: UPDATE prices SET field = t1.campo FROM prices T1 INNER JOIN prices t2 ON t1.campo_chave = Very simple t2.campo_chave, not? If one join not to be enough, makes how many joins will be necessary..