I have a table:
mytable: id userID logDate lastLogDate
For every row in that table, I want to update the \'lastLogDate\' co
You can do this:
UPDATE t SET t.logDate = t2.LatestDate FROM YourTable t INNER JOIN ( SELECT userID, MAX(LogDate) LatestDate FROM YourTable GROUP BY userID ) t2 ON t.userID = t2.userID;