Quantcast
Channel: inSQLServer.com - Script Store
Viewing all articles
Browse latest Browse all 5

Script: Update statement with joins in sql server

$
0
0

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: 


Viewing all articles
Browse latest Browse all 5

Trending Articles