title: What does the := operator mean in mysql?
body: <p>I have a <code>mysql</code> table (<code>scho_id</code>,<code>school_name</code>,<code>school_views</code>).  </p>
  
  <p>I was looking for a <code>mysql</code> query to get <code>rank</code> of schools on the basis of <code>school_views</code>.</p>
  
  <p>I found this solution on stackoverflow.</p>
  
  <pre><code>SET @points := -1, @num := 0;
  SELECT scho_id
  , school_views
  , @num := if(@points = school_views, @num, @num + 1) as school_rank
  , @points := school_info.school_views as dummy
  FROM school_info
  ORDER BY school_views desc, scho_id asc;
  </code></pre>
  
  <p>This solved my problem but I notice a new operator <code>:=</code> in this query. I am curious to know the meaning and uses of this operator.</p>