diff --git a/src/pages/sql/00-introduction.mdx b/src/pages/sql/00-introduction.mdx deleted file mode 100644 index 68c99d8..0000000 --- a/src/pages/sql/00-introduction.mdx +++ /dev/null @@ -1,9 +0,0 @@ ---- -layout: "@/layouts/MarkdownLayout.astro" ---- - -import Toc from "../../components/Toc.astro"; - -export const title = "SQLってなに?"; - -# {title} diff --git a/src/pages/sql/000-introduction.mdx b/src/pages/sql/000-introduction.mdx new file mode 100644 index 0000000..68c99d8 --- /dev/null +++ b/src/pages/sql/000-introduction.mdx @@ -0,0 +1,9 @@ +--- +layout: "@/layouts/MarkdownLayout.astro" +--- + +import Toc from "../../components/Toc.astro"; + +export const title = "SQLってなに?"; + +# {title} diff --git a/src/pages/sql/010-foundation.mdx b/src/pages/sql/010-foundation.mdx index 916befb..c707b97 100644 --- a/src/pages/sql/010-foundation.mdx +++ b/src/pages/sql/010-foundation.mdx @@ -6,4 +6,54 @@ # {title} -このセクションはまだ何も書かれていません。 +## TOC + +`users` + +| 列名 | 型 | +| :----- | :-- | +| id | INT | +| name | VARCHAR(100) | +| address | VARCHAR(255) | + +
+ +| id | name | address | +| :-- | :---- | :------ | +| 1 | 山田太郎 | 東京都千代田区 | + +`products` + +| 列名 | 型 | +| :----- | :-- | +| id | INT | +| name | VARCHAR(100) | +| price | DECIMAL(10,2) | +| stock | INT | + +`orders` + +| 列名 | 型 | +| :----- | :-- | +| id | INT | +| user_id | INT | +| product_id | INT | +| quantity | INT | + +## 型 + +## SELECT + +### WHERE + +### JOIN + +### GROUP BY + +### ORDER BY + +## INSERT + +## UPDATE + +## DELETE