<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>utgwkk</author_name>
  <author_url>https://blog.hatena.ne.jp/utgwkk/</author_url>
  <blog_title>私が歌川です</blog_title>
  <blog_url>https://blog.utgw.net/</blog_url>
  <categories>
    <anon>技術</anon>
  </categories>
  <description>趣味で作っているアプリケーションについて、データマイグレーションを行いたくなった。ちゃんとやるなら、マイグレーション用のスクリプトを書いて、メンテナンスモードにして、スクリプトを適用する……みたいな手順を踏むと思うけど、趣味プロダクトなので高速に済ませたい。SQLでSQLを組み立てればワンタイムスクリプトを書かなくてもよいのではないか、という考えに思い至ったのでメモする。 以下はSQLiteでの事例だけど、他のDBMSでも似たようなことはできると思う。 組み立て方 文字列連結 SQLiteの文字列連結は || 演算子で行う。 sqlite&gt; SELECT 'a' || 'b'; ab NULL…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.utgw.net%2Fentry%2F2021%2F06%2F22%2F191036&quot; title=&quot;SQLで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-06-22 19:10:36</published>
  <title>SQLでSQLを組み立てる</title>
  <type>rich</type>
  <url>https://blog.utgw.net/entry/2021/06/22/191036</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
