MS SQL: Update only if data record does not exist
<p>I have an MSSQL table with the following columns:</p>

<pre><code>ID (int, unique), Name (varchar), Hobby (varchar)
</code></pre>

<p>The "Hobby" column allows NULL values.
The table has these data sets (as an example):</p>

<pre><code>1, "John Doe", null
2, "Jack Doe", "racing"
3, "Mary Doe", "running"
4, "Mike Doe", null
5, "Mike Doe", "skiing"
</code></pre>

<p>I now want to do the following:
Replace null values with "chilling" in the "Hobby" column for which there is not already another data row present w/o null.
In pseudo-code I want to do this:</p>

<pre><code>UPDATE table SET Hobby = "chilling" WHERE Hobby is null and &lt;nobody with the same name has a hobby already&gt;
</code></pre>

<p>This means that the data row 1 should be affected, however the data row 5 should not be (to avoid duplicates).</p>

<p>My colleagues and I have pondered over this question for quite some time now and cannot find a solution.</p>

<p>How can I create the SQL statement which does what I am trying to achieve?</p>