Tuesday, 3 April 2012

Update Table by Joining In sqlserver

UPDATE X SET X.cloumnNanme = s.columnName ,X.cloumnNanme = s.cloumnNanme
FROM UpdatedTableName X INNER JOIN
ValueTableName s
ON(s.cloumnNanme = X.cloumnNanme)

No comments:

Post a Comment

Get all non-clustered indexes

DECLARE cIX CURSOR FOR     SELECT OBJECT_NAME(SI.Object_ID), SI.Object_ID, SI.Name, SI.Index_ID         FROM Sys.Indexes SI             ...