<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>posturan</author_name>
  <author_url>https://blog.hatena.ne.jp/posturan/</author_url>
  <blog_title>Oboe吹きプログラマの黙示録</blog_title>
  <blog_url>https://oboe2uran.hatenablog.com/</blog_url>
  <categories>
    <anon>SQL</anon>
  </categories>
  <description>WITH句を使った検索クエリは、 WITH xxxx AS ( ～ ) SELECT * FROM xxxx のように、WITH句の後で、SELECT ～ FROM with句で定義した名称 と書くものだが、 INSERT INTO ～ SELECT で使用する場合、 INSERT INTO の前に書くのか？、後ろに書くのか？どうもデータベースによって違うようである。 PostgreSQL は、 マニュアル https://www.postgresql.jp/docs/17/queries-with.html#QUERIES-WITH-MODIFYING に書いてあるように、 INSERT I…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Foboe2uran.hatenablog.com%2Fentry%2F2025%2F11%2F01%2F003000&quot; title=&quot;WITH句を使ったINSERTの書き方 - Oboe吹きプログラマの黙示録&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>2025-11-01 00:30:00</published>
  <title>WITH句を使ったINSERTの書き方</title>
  <type>rich</type>
  <url>https://oboe2uran.hatenablog.com/entry/2025/11/01/003000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
