title: Update first row entry of a null column of a record
body: <p>I have a table with columns <code>UserId</code>, <code>Email</code> and <code>Mobile</code>. <code>Email</code> has no null values, but <code>mobile</code> has nulls scattered in different rows in the table.</p>
  
  <p>I want to update the first row of each null <code>mobile</code> with unique <code>mobile</code>. I was hoping this would work but not sure.</p>
  
  <pre><code>UPDATE       userprofileplus
  SET                mobile = 9199225533
  WHERE        (UserId IN
                               (SELECT        TOP (1) UserId
                                 FROM            userprofileplus AS userprofileplus_1
                                 WHERE        (mobile IS NULL) AND (UserId = 5)))
  </code></pre>
  
  <p>My purpose is to prevent users from having unnecessary nulls on the table. One problem I observed is that SQL Server Compact Edition <strong>does not support</strong> the <code>TOP</code> keyword. How do I tackle that? </p>
  
  <p>SQL Server CE version is 4.0. I also noticed that <code>TOP</code> keyword is perfectly supported by WebMatrix but VS 2010 SP1 denies <code>TOP</code> keyword support on SQL Server CE 4. Whats going on here? When run in webmatrix, all the records with null mobile is updated neglecting the TOP criteria.I need just the first returned row to be updated not all. I also tried this. same result</p>
  
  <pre><code>UPDATE       userprofileplus
  SET                mobile = 9199225533
  WHERE        (UserId IN
                               (SELECT        UserId
                                 FROM            userprofileplus AS userprofileplus_1
                                 WHERE        (mobile IS NULL) AND (UserId = 5) order by userid offset 1 rows))
  </code></pre>
  
  <p>Someone, pls bail me out.</p>