<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gothedistance</author_name>
  <author_url>https://blog.hatena.ne.jp/gothedistance/</author_url>
  <blog_title>Life is Really Short, Have Your Life!!</blog_title>
  <blog_url>https://aroundthedistance.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Sql</anon>
  </categories>
  <description>サブクエリを使いたい時なんて、｢別のテーブルから抽出した値をブチ込む or 条件にする｣しかないよね。基本的に。ちなみにSELECT句でもサブクエリ使えるんだよね。面白いもんです。ググってもあんまりいいサンプルなかったんで、メモ代わりに書いておきます。set句に入れる場合はこんな感じ。mysql5で動作確認してます。SQL自体はテストデータ作成用なんで、大して意味無いよー。 UPDATE order_statuses as a SET updated = (SELECT orderdate FROM orders as b where a.order_id = b.id ) where a.s…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Faroundthedistance.hatenadiary.jp%2Fentry%2F2009%2F04%2F17%2F123001&quot; title=&quot;updateのsetでサブクエリ - Life is Really Short, Have Your Life!!&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>2009-04-17 12:30:01</published>
  <title>updateのsetでサブクエリ</title>
  <type>rich</type>
  <url>https://aroundthedistance.hatenadiary.jp/entry/2009/04/17/123001</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
