https://postgresqltutorial.dev/_next/static/chunks/pages/postgresql-insert.ja-JP-7900540ae3fc9f42.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4003],{1515:function(s,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/postgresql-insert.ja-JP",function(){return l(3023)}])},3023:function(s,e,l){"use strict";l.r(e),l.d(e,{__toc:function(){return c}});var r=l(5893),n=l(2673),o=l(9298),i=l(8426);l(9128);var t=l(2643);let c=[{depth:2,value:"INSERT æã®æ¦è¦",id:"insert-æã®æ¦è¦"},{depth:3,value:"åºæ¬æ§æ",id:"åºæ¬æ§æ"},{depth:2,value:"PostgreSQL ãã¼ãã«ã¸ã®ãã¼ã¿æ¿å
¥",id:"postgresql-ãã¼ãã«ã¸ã®ãã¼ã¿æ¿å
¥"},{depth:3,value:"1. åä¸ã®è¡ãæ¿å
¥ãã",id:"1-åä¸ã®è¡ãæ¿å
¥ãã"},{depth:3,value:"2. è¤æ°ã®è¡ãæ¿å
¥ãã",id:"2-è¤æ°ã®è¡ãæ¿å
¥ãã"},{depth:3,value:"3. ç¹å®ã®ã«ã©ã ã«ãã¼ã¿ãæ¿å
¥ãã",id:"3-ç¹å®ã®ã«ã©ã ã«ãã¼ã¿ãæ¿å
¥ãã"},{depth:3,value:"4. ããã©ã«ãå¤ã使ç¨ãã",id:"4-ããã©ã«ãå¤ã使ç¨ãã"},{depth:3,value:"5. å¥ã®ãã¼ãã«ãããã¼ã¿ãæ¿å
¥ãã",id:"5-å¥ã®ãã¼ãã«ãããã¼ã¿ãæ¿å
¥ãã"},{depth:3,value:"6. æ¿å
¥ããããã¼ã¿ãè¿ã",id:"6-æ¿å
¥ããããã¼ã¿ãè¿ã"},{depth:3,value:"7. ON CONFLICT ã使ç¨ãã¦ç«¶åãå¦çãã (ã¢ãããµã¼ã)",id:"7-on-conflict-ã使ç¨ãã¦ç«¶åãå¦çãã-ã¢ãããµã¼ã"},{depth:3,value:"8. ãµãã¯ã¨ãªã使ç¨ãã INSERT",id:"8-ãµãã¯ã¨ãªã使ç¨ãã-insert"},{depth:3,value:"9. JSON ãã¼ã¿ã®æ¿å
¥",id:"9-json-ãã¼ã¿ã®æ¿å
¥"},{depth:3,value:"10. ãã¼ãã«éã§ãã¼ã¿ãã³ãã¼ãã",id:"10-ãã¼ãã«éã§ãã¼ã¿ãã³ãã¼ãã"},{depth:2,value:"çµè«",id:"çµè«"},{depth:2,value:"Schema Initialization",id:"schema-initialization"}];function _createMdxContent(s){let e=Object.assign({h1:"h1",p:"p",strong:"strong",h2:"h2",h3:"h3",pre:"pre",code:"code",span:"span",ul:"ul",li:"li",a:"a",hr:"hr"},(0,t.a)(),s.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h1,{children:"PostgreSQL INSERT æ: ãã¼ãã«ã«ãã¼ã¿ã追å ãã"}),"\n",(0,r.jsxs)(e.p,{children:["ç§ãã¡ã® PostgreSQL ãã¥ã¼ããªã¢ã«ã·ãªã¼ãºã¸ããããï¼ãã®ã¬ãã¹ã³ã§ã¯ããã¼ã¿ãã¼ã¹ã®ãã¼ãã«ã«æ°ãããã¼ã¿ã追å ããããã«æ¬ ãããªãã",(0,r.jsx)(e.strong,{children:"INSERT"})," æã«ç¦ç¹ãå½ã¦ã¾ããINSERT æã广çã«ä½¿ç¨ãããã¨ã«ããããã¼ãã«ã«æå³ã®ãããã¼ã¿ãæå
¥ã§ããããã«ãªãã¾ãã"]}),"\n",(0,r.jsx)(e.h2,{id:"insert-æã®æ¦è¦",children:"INSERT æã®æ¦è¦"}),"\n",(0,r.jsxs)(e.p,{children:["PostgreSQL ã® ",(0,r.jsx)(e.strong,{children:"INSERT"})," æã¯ããã¼ãã«ã«æ°ããè¡ã追å ããããã«ä½¿ç¨ãã¾ãããã¹ã¦ã®ã«ã©ã ã«ãã¼ã¿ãæ¿å
¥ããããç¹å®ã®ã«ã©ã ã«æ¿å
¥ããããè¤æ°ã®è¡ãä¸åº¦ã«æ¿å
¥ããããä»ã®ãã¼ãã«ãããã¼ã¿ãæ¿å
¥ãããã¨ãå¯è½ã§ãã"]}),"\n",(0,r.jsx)(e.h3,{id:"åºæ¬æ§æ",children:"åºæ¬æ§æ"}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" table_name (column1, column2, ...)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" (value1, value2, ...);"})]})]})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"INSERT INTO"}),": ãã¼ã¿ãæ¿å
¥ãããã¼ãã«ãæå®ãã¾ãã"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"VALUES"}),": ã«ã©ã ã«æ¿å
¥ãããã¼ã¿ããªã¹ãã¢ãããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"postgresql-ãã¼ãã«ã¸ã®ãã¼ã¿æ¿å
¥",children:"PostgreSQL ãã¼ãã«ã¸ã®ãã¼ã¿æ¿å
¥"}),"\n",(0,r.jsx)(e.p,{children:"ã©ã¤ãã©ãªãæ ç»ãã¼ã¿ãã¼ã¹ã使ç¨ããå®ç¨çãªä¾ãéãã¦ãINSERT æã®ãã¾ãã¾ãªä½¿ãæ¹ãè¦ã¦ã¿ã¾ãããã"}),"\n",(0,r.jsx)(e.h3,{id:"1-åä¸ã®è¡ãæ¿å
¥ãã",children:"1. åä¸ã®è¡ãæ¿å
¥ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: books ãã¼ãã«ã«æ°ããæ¬ã追å "})}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books (title, author, price, pages)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Brave New World'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Aldous Huxley'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"268"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.a,{href:"#schema-initialization",children:"ã¹ãã¼ãåæåãè¦ã"})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"ãBrave New Worldã"})," ã¨ããã¿ã¤ãã«ã®æ¬ããæå®ãããèè
ãä¾¡æ ¼ããã¼ã¸æ°ã§ ",(0,r.jsx)(e.code,{children:"books"})," ãã¼ãã«ã«è¿½å ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"2-è¤æ°ã®è¡ãæ¿å
¥ãã",children:"2. è¤æ°ã®è¡ãæ¿å
¥ãã"}),"\n",(0,r.jsx)(e.p,{children:"åä¸ã®æã§è¤æ°ã®è¡ãæ¿å
¥ãããã¨ãã§ãã¾ããå¤ã®ã»ãããã«ã³ãã§åºåãã¾ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: authors ãã¼ãã«ã«è¤æ°ã®èè
ã追å "})}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Aldous Huxley'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Ray Bradbury'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Kurt Vonnegut'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["3 äººã®æ°ããèè
ã ",(0,r.jsx)(e.code,{children:"authors"})," ãã¼ãã«ã«è¿½å ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"3-ç¹å®ã®ã«ã©ã ã«ãã¼ã¿ãæ¿å
¥ãã",children:"3. ç¹å®ã®ã«ã©ã ã«ãã¼ã¿ãæ¿å
¥ãã"}),"\n",(0,r.jsxs)(e.p,{children:["ãã¹ã¦ã®ã«ã©ã ã«å¤ãæ¿å
¥ãããç¹å®ã®ã«ã©ã ã«ã®ã¿ãã¼ã¿ãæ¿å
¥ãããã¨ãã§ãã¾ããæå®ããã¦ããªãã«ã©ã ã«ã¯ããã©ã«ãå¤ã¾ã㯠",(0,r.jsx)(e.code,{children:"NULL"})," ãè¨å®ããã¾ãã"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: è£è¶³æ
å ±ãæå®ããã«æ ç»ãæ¿å
¥"})}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"movies"})," ãã¼ãã«ã«ã¯ ",(0,r.jsx)(e.code,{children:"title"})," ã«ã©ã ãããªãã®ã§ããã®ã«ã©ã ã«ã®ã¿ãã¼ã¿ãæ¿å
¥ãã¾ãã"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" movies (title)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Blade Runner'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"ãBlade Runnerã"})," ã¨ããã¿ã¤ãã«ã®æ°ããæ ç»ã ",(0,r.jsx)(e.code,{children:"movies"})," ãã¼ãã«ã«è¿½å ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"4-ããã©ã«ãå¤ã使ç¨ãã",children:"4. ããã©ã«ãå¤ã使ç¨ãã"}),"\n",(0,r.jsxs)(e.p,{children:["ããã©ã«ãå¤ãå®ç¾©ãããã«ã©ã ã«å¯¾ãã¦ã¯ã",(0,r.jsx)(e.code,{children:"DEFAULT"})," ãã¼ã¯ã¼ãã使ç¨ãã¦æç¤ºçã«ããã©ã«ãå¤ãæ¿å
¥ãããã¨ãå¯è½ã§ãã"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: ããã©ã«ãä¾¡æ ¼ã使ç¨ãã¦æ¬ãæ¿å
¥"})}),"\n",(0,r.jsxs)(e.p,{children:["ã¾ãã",(0,r.jsx)(e.code,{children:"books"})," ãã¼ãã«ã«ããã©ã«ãä¾¡æ ¼ãè¨å®ããã¦ãããã確èªãããªããã°è¿½å ãã¾ãã"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- books ãã¼ãã«ã«ããã©ã«ãä¾¡æ ¼ãè¨å®"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"ALTER"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"ALTER"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" COLUMN price "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"SET"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"DEFAULT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:";"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- ããã©ã«ãä¾¡æ ¼ã使ç¨ãã¦æ¬ãæ¿å
¥"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books (title, author, pages)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Fahrenheit 451'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Ray Bradbury'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"194"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"ãFahrenheit 451ã"})," ãããã©ã«ãä¾¡æ ¼ ",(0,r.jsx)(e.strong,{children:"$9.99"})," ã§è¿½å ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"5-å¥ã®ãã¼ãã«ãããã¼ã¿ãæ¿å
¥ãã",children:"5. å¥ã®ãã¼ãã«ãããã¼ã¿ãæ¿å
¥ãã"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"INSERT INTO ... SELECT"})," æã使ç¨ãã¦ãå¥ã®ãã¼ãã«ãã鏿ããããã¼ã¿ãæ¿å
¥ã§ãã¾ãã"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: èè
ãæ°ãããã¼ãã«ã«ã³ãã¼ãã"})}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- ã¯ã©ã·ãã¯èè
ç¨ã®æ°ãããã¼ãã«ã使"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CREATE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"classic_authors"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"));"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- authors ãã¼ãã«ãã classic_authors ã«èè
ãæ¿å
¥"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" classic_authors ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"
1)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"SELECT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"FROM"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"WHERE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"IN"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'George Orwell'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jane Austen'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Leo Tolstoy'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["æ°ãããã¼ãã« ",(0,r.jsx)(e.code,{children:"classic_authors"})," ã使ããã¾ãã"]}),"\n",(0,r.jsxs)(e.li,{children:["æå®ãããååã«ä¸è´ããèè
ã ",(0,r.jsx)(e.code,{children:"classic_authors"})," ã«ã³ãã¼ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"6-æ¿å
¥ããããã¼ã¿ãè¿ã",children:"6. æ¿å
¥ããããã¼ã¿ãè¿ã"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"RETURNING"})," å¥ã使ç¨ããã¨ãæ¿å
¥ãããè¡ã®ãã¼ã¿ãè¿ããã¨ãã§ãã¾ãã"]}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: æ¬ãæ¿å
¥ãããã®ã¿ã¤ãã«ã¨ä¾¡æ ¼ãè¿ã"})}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books (title, author, price, pages)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Slaughterhouse-Five'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Kurt Vonnegut'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"8"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"275"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"RETURNING title, price;"})})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["æ¬ãæ¿å
¥ãããæ¿å
¥ãããè¡ã® ",(0,r.jsx)(e.code,{children:"title"})," 㨠",(0,r.jsx)(e.code,{children:"price"})," ãè¿ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"7-on-conflict-ã使ç¨ãã¦ç«¶åãå¦çãã-ã¢ãããµã¼ã",children:"7. ON CONFLICT ã使ç¨ãã¦ç«¶åãå¦çãã (ã¢ãããµã¼ã)"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"ON CONFLICT"})," å¥ã使ç¨ããã¨ã䏿å¶ç´éåãçºçããå ´åã«ä»£æ¿ã®ã¢ã¯ã·ã§ã³ãæå®ã§ãã¾ãã"]}),"\n",(0,r.jsx)(e.p,{children:"ã¾ãã¯ãé¢é£ããã«ã©ã ã«ä¸æå¶ç´ãè¨å®ãã¾ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: èè
ãæ¿å
¥ããããæ¢ã«åå¨ããå ´åã¯ä½ãããªã"})}),"\n",(0,r.jsxs)(e.p,{children:["ã¾ãã",(0,r.jsx)(e.code,{children:"name"})," ã«ã©ã ã«ä¸æå¶ç´ãè¨å®ãã¾ãã"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsx)(e.code,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"ALTER"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"ADD"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CONSTRAINT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" unique_name "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"UNIQUE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})})}),"\n",(0,r.jsxs)(e.p,{children:["次㫠",(0,r.jsx)(e.code,{children:"ON CONFLICT"})," ã使ç¨ãã¾ã:"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'George Orwell'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"ON"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" CONFLICT ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") DO NOTHING;"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"ãGeorge Orwellã"})," ã®æ¿å
¥ã試ã¿ã¾ãã"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.strong,{children:"ãGeorge Orwellã"})," ãæ¢ã«åå¨ããå ´åãæ¿å
¥ãã¹ãããããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"8-ãµãã¯ã¨ãªã使ç¨ãã-insert",children:"8. ãµãã¯ã¨ãªã使ç¨ãã INSERT"}),"\n",(0,r.jsx)(e.p,{children:"ãµãã¯ã¨ãªã使ç¨ãã¦ãæ¿å
¥ããå¤ãçæãããã¨ãã§ãã¾ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: authors ãã¼ãã«ã«åå¨ããªãæ¸ç±ã®èè
ãæ¿å
¥ãã"})}),"\n",(0,r.jsxs)(e.p,{children:["ããã¤ãã®æ¸ç±ã«ã¯ã",(0,r.jsx)(e.code,{children:"authors"})," ãã¼ãã«ã«ã¾ã ç»é²ããã¦ããªãèè
ãããããããã¾ããã"]}),"\n",(0,r.jsxs)(e.p,{children:["ã¾ãã",(0,r.jsx)(e.code,{children:"books"})," ã«ããã ",(0,r.jsx)(e.code,{children:"authors"})," ã«ããªãèè
ãè¦ã¤ããããã ",(0,r.jsx)(e.code,{children:"authors"})," ã«è¿½å ãã¾ãã"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"SELECT DISTINCT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" author"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"FROM"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"WHERE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" author "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"NOT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"IN"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"SELECT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"FROM"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors);"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"books"})," ãã¼ãã«ã®èè
ã§ãã¾ã ",(0,r.jsx)(e.code,{children:"authors"})," ãã¼ãã«ã«åå¨ããªãèè
ã ",(0,r.jsx)(e.code,{children:"authors"})," ã«æ¿å
¥ããã¾ãã"]}),"\n",(0,r.jsx)(e.li,{children:"ã¹ãã¼ãä¸ã§ã¯ããã¹ã¦ã®èè
ã¯æ¢ã«åå¨ãã¦ãããããæ°ããèè
ã¯è¿½å ããã¾ããããæ°ããæ¬ã«æ°ããèè
ã追å ãããå ´åã¯æ¿å
¥ããã¾ãã"}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"9-json-ãã¼ã¿ã®æ¿å
¥",children:"9. JSON ãã¼ã¿ã®æ¿å
¥"}),"\n",(0,r.jsx)(e.p,{children:"ç¾å¨ã®ã¹ãã¼ãã«ã¯ JSON ã«ã©ã ãæã¤ãã¼ãã«ã¯ããã¾ããããæ°ãã使ãããã¨ãã§ãã¾ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: ãã¼ãã«ã« JSON ãªãã¸ã§ã¯ããæ¿å
¥"})}),"\n",(0,r.jsx)(e.p,{children:"ã¾ããJSON ã«ã©ã ãæã¤ãã¼ãã«ã使ãã¾ã:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CREATE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"book_info"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" id "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"SERIAL"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"PRIMARY KEY"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:","})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" info JSONB"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})}),"\n",(0,r.jsx)(e.p,{children:"JSON ãã¼ã¿ãæ¿å
¥ãã¾ã:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" book_info (info)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:'\'{"title": "Dune", "author": "Frank Herbert", "price": 10.99, "pages": 412}\''}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["æ¸ç±ã®è©³ç´°ãå«ã JSON ãªãã¸ã§ã¯ãã ",(0,r.jsx)(e.code,{children:"book_info"})," ãã¼ãã«ã«æ¿å
¥ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h3,{id:"10-ãã¼ãã«éã§ãã¼ã¿ãã³ãã¼ãã",children:"10. ãã¼ãã«éã§ãã¼ã¿ãã³ãã¼ãã"}),"\n",(0,r.jsx)(e.p,{children:"ãã¼ãã«éã§ãã¼ã¿ãã³ãã¼ãããã¨ãã§ãã夿ãå¯è½ã§ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"ä¾: å²å¼ä¾¡æ ¼ä»ãã® discounted_books ãã¼ãã«ã«æ¸ç±ãã³ãã¼ãã"})}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"discounted_books"})," ãã¼ãã«ã使ãã¾ã:"]}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CREATE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"discounted_books"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" author "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.j
1sxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" discounted_price "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"NUMERIC"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})})]})}),"\n",(0,r.jsx)(e.p,{children:"夿ãããå¤ã¨å
±ã«ãã¼ã¿ãæ¿å
¥ãã¾ã:"}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" discounted_books (title, author, discounted_price)"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"SELECT"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title, author, price "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"*"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"0"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"9"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"FROM"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books;"})]})]})}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"解説:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["ãã¹ã¦ã®æ¸ç±ã ",(0,r.jsx)(e.code,{children:"discounted_books"})," ã«ã³ãã¼ãããä¾¡æ ¼ã« ",(0,r.jsx)(e.strong,{children:"10%"})," ã®å²å¼ãé©ç¨ããã¾ãã"]}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"çµè«",children:"çµè«"}),"\n",(0,r.jsx)(e.p,{children:"PostgreSQL ã® INSERT æã¯ããã¼ãã«ã«ãã¼ã¿ã追å ããããã®æè»ãªãã¼ã«ã§ããåä¸ã®è¡ãè¤æ°ã®è¡ãä»ã®ãã¼ãã«ããã®ãã¼ã¿ãæ¿å
¥ããéã§ããINSERT æãç¿å¾ãããã¨ã¯å¹æçãªãã¼ã¿ãã¼ã¹ç®¡çã«ããã¦éè¦ã§ãã"}),"\n",(0,r.jsx)(e.p,{children:(0,r.jsx)(e.strong,{children:"éè¦ãªãã¤ã³ã:"})}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:["æ°ãããã¼ã¿ã追å ããã«ã¯ã",(0,r.jsx)(e.code,{children:"INSERT INTO ... VALUES"})," ã使ç¨ãã¾ãã"]}),"\n",(0,r.jsx)(e.li,{children:"è¤æ°ã®è¡ãæ¿å
¥ããã«ã¯è¤æ°ã®å¤ã»ãããæå®ãã¾ãã"}),"\n",(0,r.jsx)(e.li,{children:"ç¹å®ã®ã«ã©ã ã«ãã¼ã¿ãæ¿å
¥ããã«ã¯ãã«ã©ã ãæå®ãã¾ãã"}),"\n",(0,r.jsxs)(e.li,{children:["æ¿å
¥ãããè¡ã®æ
å ±ãåå¾ããã«ã¯ ",(0,r.jsx)(e.code,{children:"RETURNING"})," ãæ´»ç¨ãã¾ãã"]}),"\n",(0,r.jsxs)(e.li,{children:["ç«¶åãé²ãããã«ã¯ ",(0,r.jsx)(e.code,{children:"ON CONFLICT"})," ã使ç¨ãã¾ãã"]}),"\n",(0,r.jsxs)(e.li,{children:["å¥ã®ãã¼ãã«ãããã¼ã¿ãæ¿å
¥ããã«ã¯ ",(0,r.jsx)(e.code,{children:"INSERT INTO ... SELECT"})," ã使ç¨ãã¾ãã"]}),"\n",(0,r.jsx)(e.li,{children:"PostgreSQL ã® JSON ãã¼ã¿åãµãã¼ããæ´»ç¨ãã¾ãã"}),"\n"]}),"\n",(0,r.jsx)(e.hr,{}),"\n",(0,r.jsx)(e.h2,{id:"schema-initialization",children:"Schema Initialization"}),"\n",(0,r.jsx)(e.pre,{"data-language":"sql","data-theme":"default",children:(0,r.jsxs)(e.code,{"data-language":"sql","data-theme":"default",children:[(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create the books table"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CREATE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"books"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" author "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" price "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"NUMERIC"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"2"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" pages "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INTEGER"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Insert sample data into the books table"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" books (title, author, price, pages) "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'The Great Gatsby'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'F. Scott Fitzgerald'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"10"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"180"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'To Kill a Mockingbird'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Harper Lee'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"7"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"281"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'1984'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'George Orwell'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"8"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"328"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pride and Prejudice'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jane Austen'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"6"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"279"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'The Catcher in the Rye'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'J.D. Salinger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"9"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"214"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Moby-Dick'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Herman Melville'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"11"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"635"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'War and Peace'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Leo Tolstoy'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"12"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"."}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"99"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:", "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"1225"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create the authors table"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CREATE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"authors"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Insert sample data into the authors table"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" authors ("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"name"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:") "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'F. Scott Fitzgerald'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Harper Lee'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n"
1,(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'George Orwell'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Jane Austen'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'J.D. Salinger'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Herman Melville'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Leo Tolstoy'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Create the movies table"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"CREATE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"TABLE"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-function)"},children:"movies"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" ("})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" title "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VARCHAR"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-constant)"},children:"255"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:")"})]}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})}),"\n",(0,r.jsx)(e.span,{className:"line",children:" "}),"\n",(0,r.jsx)(e.span,{className:"line",children:(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-comment)"},children:"-- Insert sample data into the movies table"})}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"INSERT INTO"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:" movies (title) "}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-keyword)"},children:"VALUES"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'The Shawshank Redemption'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'The Godfather'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'The Dark Knight'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'Pulp Fiction'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"),"})]}),"\n",(0,r.jsxs)(e.span,{className:"line",children:[(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:"("}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-token-string-expression)"},children:"'The Lord of the Rings'"}),(0,r.jsx)(e.span,{style:{color:"var(--shiki-color-text)"},children:");"})]})]})}),"\n",(0,r.jsx)(e.hr,{}),"\n",(0,r.jsx)(e.p,{children:"ãã®ã¹ãã¼ãã使ã£ã¦ãINSERT æã®ç·´ç¿ãã㦠PostgreSQL ã®çè§£ãæ·±ãã¾ãããï¼Happy coding!"})]})}let a={MDXContent:function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:e}=Object.assign({},(0,t.a)(),s.components);return e?(0,r.jsx)(e,{...s,children:(0,r.jsx)(_createMdxContent,{...s})}):_createMdxContent(s)},pageOpts:{filePath:"pages/postgresql-insert.ja-JP.mdx",route:"/postgresql-insert",timestamp:1730457028e3,pageMap:[{kind:"Meta",locale:"ja-JP",data:{index:{title:"PostgreSQLã¨ã¯ï¼"},"postgresql-select":{title:"SELECT: ãã¼ã¿ã®ã¯ã¨ãª"},"postgresql-where":{title:"WHERE: ãã¼ã¿ã®ãã£ã«ã¿ãªã³ã°"},"postgresql-join":{title:"JOIN: ãã¼ãã«ãã¼ã¿ã®çµå"},"postgresql-group-by":{title:"GROUP BY: ãã¼ã¿ã®éç´"},"postgresql-insert":{title:"INSERT: æ°ãããã¼ã¿ã®è¿½å "},"postgresql-update":{title:"UPDATE: ãã¼ã¿ã®ä¿®æ£"}}},{kind:"MdxPage",name:"index",route:"/",locale:"ja-JP"},{kind:"MdxPage",name:"postgresql-group-by",route:"/postgresql-group-by",locale:"ja-JP"},{kind:"MdxPage",name:"postgresql-insert",route:"/postgresql-insert",locale:"ja-JP"},{kind:"MdxPage",name:"postgresql-join",route:"/postgresql-join",locale:"ja-JP"},{kind:"MdxPage",name:"postgresql-select",route:"/postgresql-select",locale:"ja-JP"},{kind:"MdxPage",name:"postgresql-update",route:"/postgresql-update",locale:"ja-JP"},{kind:"MdxPage",name:"postgresql-where",route:"/postgresql-where",locale:"ja-JP"}],flexsearch:{codeblocks:!0},title:"PostgreSQL INSERT æ: ãã¼ãã«ã«ãã¼ã¿ã追å ãã",headings:c},pageNextRoute:"/postgresql-insert.ja-JP",nextraLayout:o.ZP,themeConfig:i.Z};e.default=(0,n.j)(a)},8426:function(s,e,l){"use strict";var r=l(5893);l(7294);let n={logo:(0,r.jsx)("span",{children:"PostgreSQL Tutorial"}),useNextSeoProps:()=>({titleTemplate:"%s â postgresqltutorial.dev"}),editLink:{text:null},toc:{extraContent:!1},feedback:{content:null},footer:{text:(0,r.jsxs)("span",{children:["\xa9"," ",(0,r.jsx)("a",{href:"https://postgresqltutorial.dev",children:"postgresqltutorial.dev"})]})},i18n:[{locale:"en-US",text:"\uD83C\uDDFA\uD83C\uDDF8 English"},{locale:"es-ES",text:"\uD83C\uDDEA\uD83C\uDDF8 Spanish"},{locale:"fr-FR",text:"\uD83C\uDDEB\uD83C\uDDF7 French"},{locale:"de-DE",text:"\uD83C\uDDE9\uD83C\uDDEA German"},{locale:"zh-CN",text:"\uD83C\uDDE8\uD83C\uDDF3 Chinese (Simplified)"},{locale:"pt-BR",text:"\uD83C\uDDE7\uD83C\uDDF7 Portuguese (Brazil)"},{locale:"nl-NL",text:"\uD83C\uDDF3\uD83C\uDDF1 Dutch"}
1,{locale:"ko-KR",text:"\uD83C\uDDF0\uD83C\uDDF7 Korean"},{locale:"tr-TR",text:"\uD83C\uDDF9\uD83C\uDDF7 Turkish"},{locale:"vi-VN",text:"\uD83C\uDDFB\uD83C\uDDF3 Vietnamese"},{locale:"it-IT",text:"\uD83C\uDDEE\uD83C\uDDF9 Italian"},{locale:"pl-PL",text:"\uD83C\uDDF5\uD83C\uDDF1 Polish"},{locale:"uk-UA",text:"\uD83C\uDDFA\uD83C\uDDE6 Ukrainian"},{locale:"ru-RU",text:"\uD83C\uDDF7\uD83C\uDDFA Russian"},{locale:"ja-JP",text:"\uD83C\uDDEF\uD83C\uDDF5 Japanese"},{locale:"hi-IN",text:"\uD83C\uDDEE\uD83C\uDDF3 Hindi"},{locale:"bn-IN",text:"\uD83C\uDDEE\uD83C\uDDF3 Bengali"},{locale:"ta-IN",text:"\uD83C\uDDEE\uD83C\uDDF3 Tamil"},{locale:"id-ID",text:"\uD83C\uDDEE\uD83C\uDDE9 Indonesian"},{locale:"th-TH",text:"\uD83C\uDDF9\uD83C\uDDED Thai"},{locale:"sv-SE",text:"\uD83C\uDDF8\uD83C\uDDEA Swedish"},{locale:"cs-CZ",text:"\uD83C\uDDE8\uD83C\uDDFF Czech"}]};e.Z=n}},function(s){s.O(0,[9774,2977,2888,179],function(){return s(s.s=1515)}),_N_E=s.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.