Friday, 9 March 2018

Update a table using JOIN in SQL Server

  1. UPDATE t1  
  2. SET t1.TID = t2.DOID  
  3. FROM dbo.Table1 AS t1  
  4. INNER JOIN dbo.Table2 AS t2  
  5. ON t1.CommonField = t2.[Common Field] 

No comments:

Post a Comment

Upload valid file in C#

    protected bool CheckFileExtandLength(HttpPostedFile HtmlDocFile)     {         try         {             Dictionary<string, byte[]...