title: SQL - Update a single column from the max value of multiple tables
body: <p>I have a table which looks like this which I want to update:</p>
  
  <h3>Table A</h3>
  
  <pre><code>[Id] IDENTITY INT NOT NULL
  [Name] NVARCHAR(200) NOT NULL
  [Date] DATETIME NULL
  </code></pre>
  
  <p>And 5 other tables which look like this:</p>
  
  <h3>Tables B-F</h3>
  
  <pre><code>[Id] IDENTITY INT NOT NULL
  [TableAId] INT NOT NULL
  [Date] DATETIME NOT NULL
  
  CONSTRAINT [FK_TableB_TableA] FOREIGN KEY [TableAId] REFERENCES [TableA]([Id])
  </code></pre>
  
  <p><code>[Date]</code> on Table A is a new column which should be non-nullable after the value is set. The value which is set needs to be the highest <code>[Date]</code> in any of the tables B-F. What's the most efficient way to do this? </p>