<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>senyaitiya</author_name>
  <author_url>https://blog.hatena.ne.jp/senyaitiya/</author_url>
  <blog_title>千夜一夜</blog_title>
  <blog_url>https://www.senyaitiya.com/</blog_url>
  <categories>
    <anon>SQL</anon>
  </categories>
  <description>条件を満たした行のみUPDATE文でRANKを付けるSQL文について。 条件なしでRANKをUPDATEする書き方はこちらを参考にしました。 5-28 update文で連番に更新 この表に、「20歳以上のみの連番」を追加したい場合。 NO ID AGE 1 20 2 15 3 30 WHEREで20歳以上に絞った同テーブルをINNER JOINで結合し、UPDATEしました。 実行結果 NO ID AGE 1 1 20 2 15 2 3 30</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.senyaitiya.com%2Fentry%2F2021%2F01%2F06%2F220723&quot; title=&quot;条件を満たした行のみRANKで順位・連番をUPDATEするSQL - 千夜一夜&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-01-06 22:07:23</published>
  <title>条件を満たした行のみRANKで順位・連番をUPDATEするSQL</title>
  <type>rich</type>
  <url>https://www.senyaitiya.com/entry/2021/01/06/220723</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
