> ## Documentation Index
> Fetch the complete documentation index at: https://villagesql.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MySQL チュートリアル

> Sakila サンプルデータベースを使って、MySQL を 1 レッスンずつ学びます。各レッスンは構文、実際に動く例、およびサーバーが返す出力を示します。

このチュートリアルは、MySQL 上の SQL を順番に、1 レッスンずつ教えます。すべての
レッスンは同じサンプルデータベースに問い合わせるため、各レッスンは新しい
テーブルを作り出すのではなく、既にロードしたデータの上に積み上がります。表示
されるすべての結果は、動作中のサーバーから取得した出力なので、自分の画面を
ページと照らし合わせて確認できます。

SQL が初めてなら、順番に読んでください。既に SQL を書いていて、1 つの質問に
対する 1 つの答えが欲しいなら、MySQL ガイドが同じ内容をレッスン別ではなく
タスク別に整理して扱っています。

## 目次

### セットアップ

* [サーバーのインストール](https://villagesql.com/docs/ja/tutorial/install-mysql.md)
* [Sakila サンプルデータベース](https://villagesql.com/docs/ja/tutorial/sakila-database.md)
* [Sakila のロード](https://villagesql.com/docs/ja/tutorial/load-sakila.md)

### データの読み取り

* [SELECT](https://villagesql.com/docs/ja/tutorial/select.md)
* [列エイリアス](https://villagesql.com/docs/ja/tutorial/column-aliases.md)
* [ORDER BY](https://villagesql.com/docs/ja/tutorial/order-by.md)
* [SELECT DISTINCT](https://villagesql.com/docs/ja/tutorial/select-distinct.md)
* [LIMIT](https://villagesql.com/docs/ja/tutorial/limit.md)
* [演算子](https://villagesql.com/docs/ja/tutorial/operators.md)

### 行の絞り込み

* [WHERE](https://villagesql.com/docs/ja/tutorial/where.md)
* [AND、OR、および NOT](https://villagesql.com/docs/ja/tutorial/and-or-not.md)
* [IN](https://villagesql.com/docs/ja/tutorial/in.md)
* [BETWEEN](https://villagesql.com/docs/ja/tutorial/between.md)
* [LIKE](https://villagesql.com/docs/ja/tutorial/like.md)
* [IS NULL](https://villagesql.com/docs/ja/tutorial/is-null.md)
* [REGEXP](https://villagesql.com/docs/ja/tutorial/regexp.md)
* [大文字と小文字の区別](https://villagesql.com/docs/ja/tutorial/case-sensitivity.md)

### テーブルの結合

* [結合の仕組み](https://villagesql.com/docs/ja/tutorial/joins.md)
* [テーブルエイリアス](https://villagesql.com/docs/ja/tutorial/table-aliases.md)
* [INNER JOIN](https://villagesql.com/docs/ja/tutorial/inner-join.md)
* [LEFT JOIN](https://villagesql.com/docs/ja/tutorial/left-join.md)
* [RIGHT JOIN](https://villagesql.com/docs/ja/tutorial/right-join.md)
* [CROSS JOIN](https://villagesql.com/docs/ja/tutorial/cross-join.md)
* [自己結合](https://villagesql.com/docs/ja/tutorial/self-join.md)

### グループ化と集計

* [集計関数](https://villagesql.com/docs/ja/tutorial/aggregate-functions.md)
* [GROUP BY](https://villagesql.com/docs/ja/tutorial/group-by.md)
* [HAVING](https://villagesql.com/docs/ja/tutorial/having.md)
* [COUNT DISTINCT](https://villagesql.com/docs/ja/tutorial/count-distinct.md)
* [GROUP\_CONCAT](https://villagesql.com/docs/ja/tutorial/group-concat.md)
* [WITH ROLLUP](https://villagesql.com/docs/ja/tutorial/with-rollup.md)

### クエリの組み合わせとネスト

* [UNION](https://villagesql.com/docs/ja/tutorial/union.md)
* [サブクエリ](https://villagesql.com/docs/ja/tutorial/subqueries.md)
* [相関サブクエリ](https://villagesql.com/docs/ja/tutorial/correlated-subqueries.md)
* [EXISTS](https://villagesql.com/docs/ja/tutorial/exists.md)
* [ANY と ALL](https://villagesql.com/docs/ja/tutorial/any-all.md)
* [派生テーブル](https://villagesql.com/docs/ja/tutorial/derived-tables.md)
* [共通テーブル式](https://villagesql.com/docs/ja/tutorial/cte.md)
* [再帰 CTE](https://villagesql.com/docs/ja/tutorial/recursive-cte.md)

### データの変更

* [INSERT](https://villagesql.com/docs/ja/tutorial/insert.md)
* [複数行の挿入](https://villagesql.com/docs/ja/tutorial/insert-multiple-rows.md)
* [INSERT SELECT](https://villagesql.com/docs/ja/tutorial/insert-select.md)
* [UPDATE](https://villagesql.com/docs/ja/tutorial/update.md)
* [DELETE](https://villagesql.com/docs/ja/tutorial/delete.md)
* [アップサート](https://villagesql.com/docs/ja/tutorial/upsert.md)
* [トランザクション](https://villagesql.com/docs/ja/tutorial/transactions.md)

## 必要なもの

動作中のサーバー、そこにロードした Sakila サンプルデータベース、およびクライアント
です。セットアップのセクションがこの 3 つすべてを扱います。

## VillageSQL の位置づけ

VillageSQL は拡張機能フレームワークを追加した MySQL なので、このチュートリアルの
すべての文はそのまま VillageSQL 上で動作します。ここにあるレッスンで拡張機能を
必要とするものはありません。終えたあとは、拡張機能がその上に追加するものを
ガイドが扱います。

MySQL is a registered trademark of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners. VillageSQL is not affiliated with
or endorsed by Oracle Corporation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.