Script: Update statement with joins in sql server

Submitted by Nizam on

Here is simple sql update script with inner join in the statement 

Update  docs  

set            FileName = 'abcd’,  FileNo = b.FileNo + 1 

from       DocAttributes a

inner  join Docs b on a.DocID = b.DocId

where  a.doctypeId = 2


Tags: