{"id":187,"date":"2023-10-28T05:39:00","date_gmt":"2023-01-16T02:12:08","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/"},"modified":"2024-03-19T23:08:55","modified_gmt":"2024-03-19T14:08:55","slug":"sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/","title":{"rendered":"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>\u8457\u8005\u306f\u300cWrite for Donations\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001\u5bc4\u4ed8\u3092\u3059\u308b\u305f\u3081\u306b\u3001Diversity in Tech Fund\u3092\u9078\u3073\u307e\u3057\u305f\u3002<\/p>\n<h3>\u306f\u3058\u3081\u306b<\/h3>\n<p>\u591a\u304f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u610f\u5473\u3068\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u60c5\u5831\u3092\u7570\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u306b\u5206\u6563\u3055\u305b\u3066\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u4fdd\u6301\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u969b\u306b\u306f\u3001\u901a\u5e38\u3001\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u540c\u6642\u306b\u53c2\u7167\u3057\u305f\u3044\u3068\u601d\u3046\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Structured Query Language (SQL)\u306f\u3001\u7570\u306a\u308b\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u305f\u3081\u306e\u8907\u6570\u306e\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u5177\u4f53\u7684\u306b\u306f\u3001\u96c6\u5408\u6f14\u7b97\u306a\u3069\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u7279\u306b\u3001\u96c6\u5408\u6f14\u7b97\u5b50\u306eUNION\u306f\u3001\u307b\u3068\u3093\u3069\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u3067\u5e83\u304f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002UNION\u6f14\u7b97\u306f\u3001\u4e00\u81f4\u3059\u308b\u5217\u3092\u6301\u30642\u3064\u306e\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u53d6\u308a\u30011\u3064\u306b\u30de\u30fc\u30b8\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001UNION\u64cd\u4f5c\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u540c\u6642\u306b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u7d50\u679c\u3092\u7d50\u5408\u3057\u307e\u3059\u3002\u3055\u3089\u306b\u3001UNION\u6f14\u7b97\u5b50\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u7d50\u679c\u3092\u4e26\u3079\u66ff\u3048\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306b\u5f93\u3046\u305f\u3081\u306b\u306f\u3001SQL\u30d9\u30fc\u30b9\u306e\u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\uff08RDBMS\uff09\u304c\u52d5\u4f5c\u3059\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u306e\u624b\u9806\u3068\u4f8b\u306f\u3001\u4ee5\u4e0b\u306e\u74b0\u5883\u3092\u4f7f\u7528\u3057\u3066\u691c\u8a3c\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<ul class=\"post-ul\">\n<li>A server running Ubuntu 20.04, with a non-root user with administrative privileges and a firewall configured with UFW, as described in our initial server setup guide for Ubuntu 20.04.<\/li>\n<li>MySQL installed and secured on the server, as outlined in How To Install MySQL on Ubuntu 20.04. This guide was verified with a non-root MySQL user, created using the process described in Step 3.<\/li>\n<li>Basic familiarity with executing SELECT queries to select data from the database, as described in our How To SELECT Rows FROM Tables in SQL guide.<\/li>\n<\/ul>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f: \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u8aac\u660e\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306f\u3001\u307b\u3068\u3093\u3069\u306eRDBMS\u3067\u52d5\u4f5c\u3059\u308b\u3068\u3068\u3082\u306b\u3001\u6a19\u6e96\u306eSQL\u69cb\u6587\u306e\u4e00\u90e8\u3067\u3059\u304c\u3001\u591a\u304f\u306eRDBMS\u306f\u72ec\u81ea\u306eSQL\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u305f\u3081\u3001MySQL\u4ee5\u5916\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u30c6\u30b9\u30c8\u3059\u308b\u5834\u5408\u3001\u6b63\u78ba\u306a\u69cb\u6587\u3084\u51fa\u529b\u306f\u7570\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u30cd\u30a4\u30c6\u30a3\u30d6\u306a\u65e5\u672c\u8a9e\u3067\u4ee5\u4e0b\u3092\u8a00\u3044\u63db\u3048\u308b\uff1a<br \/>\nUNION\u64cd\u4f5c\u306e\u4f7f\u3044\u65b9\u3092\u7df4\u7fd2\u3059\u308b\u305f\u3081\u306b\u3001\u3044\u304f\u3064\u304b\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3067\u30c6\u30fc\u30d6\u30eb\u304c\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u5fc5\u8981\u3067\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u5168\u4f53\u3067\u4f7f\u7528\u3055\u308c\u308b\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306eMySQL\u30b5\u30fc\u30d0\u30fc\u3078\u306e\u63a5\u7d9a\u65b9\u6cd5\u306e\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u300cMySQL\u3078\u306e\u63a5\u7d9a\u3068\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u300d\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>MySQL\u306b\u63a5\u7d9a\u3057\u3001\u30b5\u30f3\u30d7\u30eb\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3059\u308b\u3002<\/h2>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3057\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3067\u3001\u3053\u306e\u30ac\u30a4\u30c9\u306e\u4f8b\u306b\u5f93\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u3067SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u3092\u5b9f\u884c\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u304b\u3089\u30b5\u30fc\u30d0\u306bSSH\u63a5\u7d9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\"><span class=\"token function\">ssh<\/span> <mark>sammy<\/mark>@<mark>your_server_ip<\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b5\u30df\u30fc\u306e\u90e8\u5206\u3092\u3001\u81ea\u5206\u306eMySQL\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u540d\u524d\u3067\u7f6e\u304d\u63db\u3048\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">mysql <span class=\"token parameter variable\">-u<\/span> <mark>sammy<\/mark> <span class=\"token parameter variable\">-p<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u66f8\u5e97\u3068\u3044\u3046\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002 (Shoten to iu datab\u0113su wo sakusei shite kudasai)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE DATABASE bookstore<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u6b63\u5e38\u306b\u4f5c\u6210\u3055\u308c\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51fa\u529b\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 1 row affected (0.01 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306eUSE\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3001\u66f8\u5e97\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"$\">USE bookstore<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u7d50\u679c\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002 (Anata wa shita no shutsuryoku kekka o uketorimasu.)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Database changed<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3057\u305f\u3089\u3001\u305d\u306e\u4e2d\u306b\u30b5\u30f3\u30d7\u30eb\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u306e\u76ee\u7684\u306e\u305f\u3081\u306b\u3001\u66f8\u7c4d\u306e\u8cfc\u5165\u3068\u8cb8\u51fa\u306e\u4e21\u65b9\u3092\u63d0\u4f9b\u3059\u308b\u67b6\u7a7a\u306e\u66f8\u5e97\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u4e21\u65b9\u306e\u30b5\u30fc\u30d3\u30b9\u306f\u500b\u5225\u306b\u7ba1\u7406\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u8cfc\u5165\u3068\u8cb8\u51fa\u306b\u95a2\u3059\u308b\u30c7\u30fc\u30bf\u306f\u5225\u3005\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u3053\u306e\u4f8b\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30b9\u30ad\u30fc\u30de\u306f\u6559\u80b2\u76ee\u7684\u306e\u305f\u3081\u306b\u5358\u7d14\u5316\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5b9f\u969b\u306e\u30b7\u30ca\u30ea\u30aa\u3067\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u69cb\u9020\u306f\u3088\u308a\u8907\u96d1\u3067\u3001\u4e3b\u30ad\u30fc\u3068\u5916\u90e8\u30ad\u30fc\u304c\u95a2\u4e0e\u3057\u3066\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u30c7\u30fc\u30bf\u3092\u3069\u306e\u3088\u3046\u306b\u6574\u7406\u3059\u308b\u304b\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306f\u3001\u5f0a\u793e\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u7406\u89e3\u306b\u95a2\u3059\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n<p>\u6700\u521d\u306e\u30c6\u30fc\u30d6\u30eb\u3067\u3042\u308bbook_purchases\u306f\u3001\u8cfc\u5165\u3055\u308c\u305f\u672c\u3068\u8cfc\u5165\u3092\u884c\u3063\u305f\u9867\u5ba2\u306b\u95a2\u3059\u308b\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u306f4\u3064\u306e\u5217\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>purchase_id: This column holds the purchase identifier, represented by the int data type. This column will become the table\u2019s primary key, with each value becoming a unique identifier for its respective row.<\/li>\n<li>customer_name: This column will hold customer\u2019s name, expressed using the varchar data type with a maximum of 30 characters.<\/li>\n<li>book_title: This column will hold the purchased book\u2019s title, expressed using the varchar data type with a maximum of 200 characters.<\/li>\n<li>date: Using the date data type, this column will hold the date of each purchase.<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u30b5\u30f3\u30d7\u30eb\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE TABLE book_purchases <span class=\"token punctuation\">(<\/span><\/li>\n<li data-prefix=\"mysql&gt;\">purchase_id int,<\/li>\n<li data-prefix=\"mysql&gt;\">customer_name varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">30<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">book_title varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">40<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token function\">date<\/span> date,<\/li>\n<li data-prefix=\"mysql&gt;\">PRIMARY KEY <span class=\"token punctuation\">(<\/span>purchase_id<span class=\"token punctuation\">)<\/span><\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3082\u3057\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u305f\u306a\u3089\u3070\u3001\u6700\u521d\u306e\u30c6\u30fc\u30d6\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u7b2c2\u306e\u30c6\u30fc\u30d6\u30eb\u306fbook_leases\u3068\u547c\u3070\u308c\u3001\u501f\u308a\u3089\u308c\u305f\u672c\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u524d\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u540c\u69d8\u306e\u69cb\u9020\u3067\u3059\u304c\u3001\u8cb8\u51fa\u306f2\u3064\u306e\u7570\u306a\u308b\u65e5\u4ed8\u3067\u7279\u5fb4\u4ed8\u3051\u3089\u308c\u307e\u3059\uff1a\u8cb8\u51fa\u65e5\u3068\u8cb8\u51fa\u671f\u9593\u3002\u3053\u308c\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306b\u3001leases\u30c6\u30fc\u30d6\u30eb\u306b\u306f5\u3064\u306e\u5217\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>lease_id: This column holds the lease identifier, represented by the int data type. This column will become the table\u2019s primary key, with each value becoming a unique identifier for its respective row.<\/li>\n<li>customer_name: This column will hold customer\u2019s name, expressed using the varchar data type with a maximum of 30 characters.<\/li>\n<li>book_title: This column will hold borrowed book\u2019s title, expressed using the varchar data type with a maximum of 200 characters.<\/li>\n<li>date_from: Using the date data type, this column will hold the start date of a lease.<\/li>\n<li>date_to: Using the date data type, this column will hold the end date of a lease.<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u30672\u756a\u76ee\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">CREATE TABLE book_leases <span class=\"token punctuation\">(<\/span><\/li>\n<li data-prefix=\"mysql&gt;\">lease_id int,<\/li>\n<li data-prefix=\"mysql&gt;\">customer_name varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">30<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">book_title varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">40<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">date_from date,<\/li>\n<li data-prefix=\"mysql&gt;\">date_to date,<\/li>\n<li data-prefix=\"mysql&gt;\">PRIMARY KEY <span class=\"token punctuation\">(<\/span>lease_id<span class=\"token punctuation\">)<\/span><\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u306f\u30012\u756a\u76ee\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 0 rows affected (0.00 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001\u6b21\u306eINSERT INTO\u64cd\u4f5c\u3092\u5b9f\u884c\u3057\u3066\u3001\u8cfc\u5165\u30c6\u30fc\u30d6\u30eb\u306b\u3044\u304f\u3064\u304b\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">INSERT INTO book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\">VALUES<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span>, <span class=\"token string\">&#8216;sammy&#8217;<\/span>, <span class=\"token string\">&#8216;The Picture of Dorian Gray&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span>, <span class=\"token string\">&#8216;sammy&#8217;<\/span>, <span class=\"token string\">&#8216;Pride and Prejudice&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-04&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">3<\/span>, <span class=\"token string\">&#8216;sammy&#8217;<\/span>, <span class=\"token string\">&#8216;The Time Machine&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-23&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">4<\/span>, <span class=\"token string\">&#8216;bill&#8217;<\/span>, <span class=\"token string\">&#8216;Frankenstein&#8217;<\/span>, <span class=\"token string\">&#8216;2022-07-23&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span>, <span class=\"token string\">&#8216;bill&#8217;<\/span>, <span class=\"token string\">&#8216;The Adventures of Huckleberry Finn&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">6<\/span>, <span class=\"token string\">&#8216;walt&#8217;<\/span>, <span class=\"token string\">&#8216;The Picture of Dorian Gray&#8217;<\/span>, <span class=\"token string\">&#8216;2022-04-15&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">7<\/span>, <span class=\"token string\">&#8216;walt&#8217;<\/span>, <span class=\"token string\">&#8216;Frankenstein&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-13&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">8<\/span>, <span class=\"token string\">&#8216;walt&#8217;<\/span>, <span class=\"token string\">&#8216;Pride and Prejudice&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-19&#8217;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>INSERT INTO\u64cd\u4f5c\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u5024\u3067book_purchases\u30c6\u30fc\u30d6\u30eb\u306b8\u3064\u306e\u8cfc\u5165\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u51fa\u529b\u306f\u30018\u3064\u306e\u884c\u304c\u3059\u3079\u3066\u8ffd\u52a0\u3055\u308c\u305f\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 8 rows affected (0.00 sec) Records: 8 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u306e\u5f8c\u3001book_leases\u30c6\u30fc\u30d6\u30eb\u306b\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u633f\u5165\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">INSERT INTO book_leases<\/li>\n<li data-prefix=\"mysql&gt;\">VALUES<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">1<\/span>, <span class=\"token string\">&#8216;sammy&#8217;<\/span>, <span class=\"token string\">&#8216;Frankenstein&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-14&#8217;<\/span>, <span class=\"token string\">&#8216;2022-11-14&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">2<\/span>, <span class=\"token string\">&#8216;sammy&#8217;<\/span>, <span class=\"token string\">&#8216;Pride and Prejudice&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span>, <span class=\"token string\">&#8216;2022-12-31&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">3<\/span>, <span class=\"token string\">&#8216;sammy&#8217;<\/span>, <span class=\"token string\">&#8216;The Adventures of Huckleberry Finn&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span>, <span class=\"token string\">&#8216;2022-12-01&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">4<\/span>, <span class=\"token string\">&#8216;bill&#8217;<\/span>, <span class=\"token string\">&#8216;The Picture of Dorian Gray&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-03&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-18&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span>, <span class=\"token string\">&#8216;bill&#8217;<\/span>, <span class=\"token string\">&#8216;Crime and Punishment&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-27&#8217;<\/span>, <span class=\"token string\">&#8216;2022-12-05&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">6<\/span>, <span class=\"token string\">&#8216;kim&#8217;<\/span>, <span class=\"token string\">&#8216;The Picture of Dorian Gray&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span>, <span class=\"token string\">&#8216;2022-11-15&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">7<\/span>, <span class=\"token string\">&#8216;kim&#8217;<\/span>, <span class=\"token string\">&#8216;Pride and Prejudice&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-08&#8217;<\/span>, <span class=\"token string\">&#8216;2022-11-17&#8217;<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\"><span class=\"token punctuation\">(<\/span><span class=\"token number\">8<\/span>, <span class=\"token string\">&#8216;kim&#8217;<\/span>, <span class=\"token string\">&#8216;The Time Machine&#8217;<\/span>, <span class=\"token string\">&#8216;2022-09-04&#8217;<\/span>, <span class=\"token string\">&#8216;2022-10-23&#8217;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u3063\u3066\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u304c\u8ffd\u52a0\u3055\u308c\u305f\u3053\u3068\u304c\u78ba\u8a8d\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>Query OK, 8 rows affected (0.00 sec) Records: 8 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30ea\u30fc\u30b9\u3068\u8cfc\u5165\u306f\u3001\u985e\u4f3c\u3057\u305f\u9867\u5ba2\u3068\u66f8\u7c4d\u30bf\u30a4\u30c8\u30eb\u306b\u95a2\u9023\u3057\u3066\u304a\u308a\u3001UNION\u6f14\u7b97\u5b50\u306e\u52d5\u4f5c\u3092\u793a\u3059\u305f\u3081\u306b\u5f79\u7acb\u3064\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u3042\u3068\u306f\u30ac\u30a4\u30c9\u306e\u6b8b\u308a\u3092\u8ffd\u3063\u3066\u3001SQL\u3067UNION\u64cd\u4f5c\u3092\u4f7f\u3044\u59cb\u3081\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2>UNION\u6f14\u7b97\u5b50\u306e\u69cb\u6587\u306e\u7406\u89e3<\/h2>\n<p>SQL\u306eUNION\u6f14\u7b97\u5b50\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u500b\u5225\u306eSELECT\u30af\u30a8\u30ea\u3092\u901a\u3058\u3066\u53d6\u5f97\u3057\u305f2\u3064\u306e\u5225\u3005\u306e\u7d50\u679c\u30bb\u30c3\u30c8\u3092\u30de\u30fc\u30b8\u3057\u3001\u4e21\u65b9\u306e\u30af\u30a8\u30ea\u304b\u3089\u8fd4\u3055\u308c\u305f\u884c\u3092\u542b\u30801\u3064\u306e\u7d50\u679c\u30bb\u30c3\u30c8\u306b\u3059\u308b\u3088\u3046\u6307\u793a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u306f\u3001UNION\u3068\u3068\u3082\u306b\u4f7f\u7528\u3055\u308c\u308bSELECT\u30af\u30a8\u30ea\u306e\u8907\u96d1\u3055\u3092\u5236\u9650\u3057\u307e\u305b\u3093\u3002\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u30af\u30a8\u30ea\u306b\u306f\u3001JOIN\u6587\u3001\u96c6\u8a08\u3001\u307e\u305f\u306f\u30b5\u30d6\u30af\u30a8\u30ea\u3092\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3057\u3070\u3057\u3070\u3001UNION\u306f\u8907\u96d1\u306a\u6587\u304b\u3089\u5f97\u3089\u308c\u305f\u7d50\u679c\u3092\u7d71\u5408\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002\u6559\u80b2\u76ee\u7684\u306e\u305f\u3081\u3001\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001UNION\u6f14\u7b97\u5b50\u306e\u632f\u308b\u821e\u3044\u306b\u7126\u70b9\u3092\u5f53\u3066\u308b\u305f\u3081\u3001SELECT\u30af\u30a8\u30ea\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u6b21\u306e\u4f8b\u3067\u306f\u3001UNION\u6f14\u7b97\u5b50\u3092\u542b\u3080SQL\u6587\u306e\u4e00\u822c\u7684\u306a\u69cb\u6587\u304c\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT column1, column2 FROM table1<\/li>\n<li data-prefix=\"mysql&gt;\"><mark>UNION<\/mark><\/li>\n<li data-prefix=\"mysql&gt;\">SELECT column1, column2 FROM table2<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306eSQL\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306f\u3001\u6700\u521d\u306b\u30c6\u30fc\u30d6\u30eb1\u304b\u30892\u3064\u306e\u5217\u3092\u8fd4\u3059SELECT\u6587\u3067\u59cb\u307e\u308a\u3001\u305d\u3057\u3066UNION\u6f14\u7b97\u5b50\u30682\u756a\u76ee\u306eSELECT\u6587\u304c\u7d9a\u304d\u307e\u3059\u30022\u756a\u76ee\u306eSELECT\u30af\u30a8\u30ea\u30822\u3064\u306e\u5217\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001\u305d\u308c\u306f\u30c6\u30fc\u30d6\u30eb2\u304b\u3089\u3067\u3059\u3002UNION\u30ad\u30fc\u30ef\u30fc\u30c9\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u524d\u5f8c\u306e\u30af\u30a8\u30ea\u3092\u5225\u3005\u306b\u5b9f\u884c\u3057\u3001\u305d\u306e\u7d50\u679c\u30bb\u30c3\u30c8\u3092\u4e00\u3064\u306b\u7d50\u5408\u3059\u308b\u3088\u3046\u306b\u6307\u793a\u3057\u307e\u3059\u3002\u4e21\u65b9\u306eSELECT\u30af\u30a8\u30ea\u3068\u305d\u308c\u3089\u306e\u9593\u306eUNION\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u542b\u3080\u3053\u306e\u30b3\u30fc\u30c9\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306f\u3001\u5358\u4e00\u306eSQL\u6587\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u6700\u521d\u306eSELECT\u30af\u30a8\u30ea\u306f\u30bb\u30df\u30b3\u30ed\u30f3\u3067\u7d42\u308f\u3089\u305a\u3001\u5168\u4f53\u306e\u6587\u306e\u5f8c\u306b\u306e\u307f\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u672c\u3092\u8cfc\u5165\u3057\u305f\u304b\u8cb8\u3057\u51fa\u3057\u305f\u9867\u5ba2\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002\u8cfc\u5165\u306e\u8a18\u9332\u306f\u300cbook_purchases\u300d\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u6301\u3055\u308c\u3066\u304a\u308a\u3001\u4e00\u65b9\u3001\u8cb8\u3057\u51fa\u3057\u306f\u300cbook_leases\u300d\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT customer_name FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\"><mark>UNION<\/mark><\/li>\n<li data-prefix=\"mysql&gt;\">SELECT customer_name FROM book_leases<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u3061\u3089\u304c\u3053\u306e\u30af\u30a8\u30ea\u306e\u7d50\u679c\u30bb\u30c3\u30c8\u3067\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;+ | customer_name | +&#8212;&#8212;&#8212;&#8212;&#8212;+ | sammy | | bill | | walt | | kim | +&#8212;&#8212;&#8212;&#8212;&#8212;+ 4 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u51fa\u529b\u306f\u3001\u30b5\u30df\u30fc\u3001\u30d3\u30eb\u3001\u30ef\u30eb\u30c8\u3001\u30ad\u30e0\u306e\u3044\u305a\u308c\u304b\u304c\u4f55\u3089\u304b\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u672c\u3092\u8cfc\u5165\u307e\u305f\u306f\u30ea\u30fc\u30b9\u3057\u305f\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u7d50\u679c\u30bb\u30c3\u30c8\u304c\u3069\u306e\u3088\u3046\u306b\u751f\u6210\u3055\u308c\u305f\u304b\u3092\u7406\u89e3\u3059\u308b\u306b\u306f\u3001\u8cfc\u5165\u306b\u3064\u3044\u30661\u5ea6\u3001\u30ea\u30fc\u30b9\u306b\u3064\u3044\u30661\u5ea6\u3001\u305d\u308c\u305e\u308cSELECT\u6587\u3092\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u672c\u3092\u8cfc\u5165\u3057\u305f\u9867\u5ba2\u3092\u8fd4\u3059\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT customer_name FROM book_purchases<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u306f\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;+ | customer_name | +&#8212;&#8212;&#8212;&#8212;&#8212;+ | sammy | | sammy | | sammy | | bill | | bill | | walt | | walt | | walt | +&#8212;&#8212;&#8212;&#8212;&#8212;+ 8 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30b5\u30df\u30fc\u3001\u30d3\u30eb\u3001\u305d\u3057\u3066\u30a6\u30a9\u30eb\u30c8\u306f\u672c\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u304c\u3001\u30ad\u30e0\u306f\u307e\u3060\u8cfc\u5165\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u6b21\u306b\u3001\u672c\u3092\u501f\u308a\u305f\u9867\u5ba2\u3092\u8fd4\u3059\u305f\u3081\u306b\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002 (Tsugi ni, honwo karita kokyaku wo kaesu tame ni kueri wo jikkou shite kudasai)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT customer_name FROM book_leases<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u6b21\u306e\u51fa\u529b\u306f\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u307e\u3059\uff1a<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;+ | customer_name | +&#8212;&#8212;&#8212;&#8212;&#8212;+ | sammy | | sammy | | sammy | | bill | | bill | | kim | | kim | | kim | +&#8212;&#8212;&#8212;&#8212;&#8212;+ 8 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30ea\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u306f\u30b5\u30df\u30fc\u3001\u30d3\u30eb\u3001\u30ad\u30e0\u306b\u95a2\u9023\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u30ef\u30eb\u30c8\u306f\u6c7a\u3057\u3066\u672c\u3092\u501f\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u3089\u306e2\u3064\u306e\u56de\u7b54\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u30ea\u30fc\u30b9\u3068\u8cfc\u5165\u306e\u4e21\u65b9\u306e\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>UNION\u30682\u3064\u306e\u30af\u30a8\u30ea\u3092\u5225\u3005\u306b\u5b9f\u884c\u3059\u308b\u3053\u3068\u306e\u91cd\u8981\u306a\u9055\u3044\u306f\u3001\u7d50\u679c\u3092\u30de\u30fc\u30b8\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u91cd\u8907\u3059\u308b\u5024\u3092\u524a\u9664\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u305d\u306e\u7d50\u679c\u306b\u306f\u3001\u9867\u5ba2\u306e\u540d\u524d\u304c\u7e70\u308a\u8fd4\u3057\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>2\u3064\u306e\u5225\u3005\u306e\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u6b63\u3057\u304f\u30de\u30fc\u30b8\u3059\u308b\u305f\u3081\u306b\u3001UNION\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u4e21\u65b9\u306e\u30af\u30a8\u30ea\u304c\u540c\u3058\u5f62\u5f0f\u3067\u7d50\u679c\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3044\u304f\u3064\u304b\u306e\u76f8\u9055\u70b9\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306e\u30a8\u30e9\u30fc\u3092\u5f15\u304d\u8d77\u3053\u3057\u3001\u4ed6\u306e\u76f8\u9055\u70b9\u306f\u30af\u30a8\u30ea\u306e\u610f\u56f3\u306b\u4e00\u81f4\u3057\u306a\u3044\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306b\u793a\u30592\u3064\u306e\u4f8b\u3092\u8003\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff1a<\/p>\n<p>\u30ab\u30e9\u30e0\u6570\u304c\u4e00\u81f4\u3057\u306a\u3044\u5834\u5408\u306eUNION<\/p>\n<p>\u5358\u4e00\u306e\u5217\u3092\u8fd4\u3059SELECT\u6587\u3068\u30012\u3064\u306e\u5217\u3092\u8fd4\u3059\u5225\u306eSELECT\u6587\u306e\u9593\u306bUNION\u3092\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT <mark>purchase_id, customer_name<\/mark> FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\">UNION<\/li>\n<li data-prefix=\"mysql&gt;\">SELECT <mark>customer_name<\/mark> FROM book_leases<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u306f\u30a8\u30e9\u30fc\u3067\u8fd4\u4fe1\u3057\u307e\u3059\u3002 (De-ta-be-su sa-ba- wa e-ra- de hen-shin shi-masu.)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>The used SELECT statements have a different number of columns<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u7570\u306a\u308b\u5217\u6570\u3092\u6301\u3064\u7d50\u679c\u30bb\u30c3\u30c8\u306b\u5bfe\u3057\u3066\u3001UNION\u64cd\u4f5c\u306f\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u5217\u306e\u9806\u5e8f\u304c\u7570\u306a\u308bUNION<\/p>\n<p>\u540c\u3058\u5024\u3092\u8fd4\u3059\u304c\u3001\u9806\u5e8f\u304c\u7570\u306a\u308b2\u3064\u306eSELECT\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306e\u9593\u3067UNION\u3092\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT <mark>customer_name, book_title<\/mark> FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\">UNION<\/li>\n<li data-prefix=\"mysql&gt;\">SELECT <mark>book_title, customer_name<\/mark> FROM book_leases<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u306f\u30a8\u30e9\u30fc\u3092\u8fd4\u3055\u306a\u3044\u304c\u3001\u7d50\u679c\u30bb\u30c3\u30c8\u306f\u6b63\u3057\u304f\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | customer_name | book_title | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | sammy | The Picture of Dorian Gray | | sammy | Pride and Prejudice | | sammy | The Time Machine | | bill | Frankenstein | | bill | The Adventures of Huckleberry Finn | | walt | The Picture of Dorian Gray | | walt | Frankenstein | | walt | Pride and Prejudice | | Frankenstein | sammy | | Pride and Prejudice | sammy | | The Adventures of Huckleberry Finn | sammy | | The Picture of Dorian Gray | bill | | Crime and Punishment | bill | | The Picture of Dorian Gray | kim | | Pride and Prejudice | kim | | The Time Machine | kim | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ 16 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001UNION\u6f14\u7b97\u5b50\u306f\u6700\u521d\u306e\u30af\u30a8\u30ea\u306e\u6700\u521d\u306e\u5217\u30682\u756a\u76ee\u306e\u30af\u30a8\u30ea\u306e\u6700\u521d\u306e\u5217\u3092\u7d50\u5408\u3057\u3001\u540c\u69d8\u306b2\u756a\u76ee\u306e\u5217\u3082\u7d50\u5408\u3057\u307e\u3059\u3002\u9867\u5ba2\u540d\u3068\u66f8\u7c4d\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u6df7\u305c\u5408\u308f\u305b\u307e\u3059\u3002<\/p>\n<h2>WHERE\u53e5\u3068UNION\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u5229\u7528\u3057\u3066\u3001\u9806\u5e8f\u4ed8\u3051\u3092\u884c\u3046\u65b9\u6cd5\u3092\u4f7f\u7528\u3059\u308b\u3002<\/h2>\n<p>\u524d\u306e\u4f8b\u3067\u306f\u30012\u3064\u306e\u5bfe\u5fdc\u3059\u308b\u30c6\u30fc\u30d6\u30eb\u306e\u3059\u3079\u3066\u306e\u884c\u3092\u8868\u3059\u7d50\u679c\u30bb\u30c3\u30c8\u3092\u30de\u30fc\u30b8\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3057\u3070\u3057\u3070\u7d50\u679c\u3092\u30de\u30fc\u30b8\u3059\u308b\u524d\u306b\u884c\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002UNION\u6f14\u7b97\u5b50\u3067\u30de\u30fc\u30b8\u3055\u308c\u308bSELECT\u6587\u306f\u3001WHERE\u53e5\u3092\u4f7f\u7528\u3057\u3066\u884c\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3042\u306a\u305f\u304c\u66f8\u5e97\u306e\u5354\u529b\u3092\u5f97\u3066\u3001\u30b5\u30df\u30fc\u304c\u3069\u306e\u672c\u3092\u8cfc\u5165\u307e\u305f\u306f\u8cb8\u3057\u51fa\u3057\u3067\u8aad\u3093\u3067\u3044\u308b\u304b\u77e5\u308a\u305f\u3044\u3068\u4eee\u5b9a\u3057\u307e\u3059\u3002\u6b21\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\"><mark>WHERE customer_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Sammy&#8217;<\/span><\/mark><\/li>\n<li data-prefix=\"mysql&gt;\">UNION<\/li>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_leases<\/li>\n<li data-prefix=\"mysql&gt;\"><mark>WHERE customer_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Sammy&#8217;<\/span><span class=\"token punctuation\">;<\/span><\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4e21\u65b9\u306eSELECT\u30af\u30a8\u30ea\u306b\u306f\u3001Sammy\u306b\u3088\u308b\u8cfc\u5165\u3068\u30ea\u30fc\u30b9\u3092\u542b\u3080\u884c\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308bWHERE\u53e5\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u3053\u306e\u30af\u30a8\u30ea\u306e\u7d50\u679c\u30bb\u30c3\u30c8\u306f\u6b21\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | book_title | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | The Picture of Dorian Gray | | Pride and Prejudice | | The Time Machine | | Frankenstein | | The Adventures of Huckleberry Finn | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ 5 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3082\u3046\u4e00\u5ea6\u8a00\u3044\u307e\u3059\u304c\u3001UNION\u306f\u7d50\u679c\u306e\u30ea\u30b9\u30c8\u306b\u91cd\u8907\u304c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002SELECT\u30af\u30a8\u30ea\u306e\u3069\u3061\u3089\u304b\u3001\u307e\u305f\u306f\u4e21\u65b9\u3067\u8fd4\u3055\u308c\u308b\u884c\u3092\u5236\u9650\u3059\u308b\u305f\u3081\u306b\u3001WHERE\u53e5\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3055\u3089\u306b\u3001WHERE\u53e5\u306f\u4e21\u6587\u3067\u7570\u306a\u308b\u5217\u3084\u6761\u4ef6\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>UNION\u6f14\u7b97\u5b50\u3092\u901a\u3058\u3066\u8fd4\u3055\u308c\u308b\u7d50\u679c\u306b\u306f\u7279\u5b9a\u306e\u9806\u5e8f\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u308c\u3092\u5909\u66f4\u3059\u308b\u306b\u306f\u3001ORDER BY\u53e5\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u9806\u5e8f\u4ed8\u3051\u306f\u3001\u500b\u3005\u306e\u30af\u30a8\u30ea\u3067\u306f\u306a\u304f\u6700\u7d42\u7684\u306a\u30de\u30fc\u30b8\u3055\u308c\u305f\u7d50\u679c\u306b\u5bfe\u3057\u3066\u884c\u308f\u308c\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30df\u30fc\u304c\u8cfc\u5165\u307e\u305f\u306f\u30ea\u30fc\u30b9\u3057\u305f\u3059\u3079\u3066\u306e\u672c\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3057\u305f\u5f8c\u3001\u66f8\u7c4d\u30bf\u30a4\u30c8\u30eb\u3092\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c8\u9806\u306b\u30bd\u30fc\u30c8\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\">WHERE customer_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Sammy&#8217;<\/span><\/li>\n<li data-prefix=\"mysql&gt;\"><mark>UNION<\/mark><\/li>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_leases<\/li>\n<li data-prefix=\"mysql&gt;\">WHERE customer_name <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;Sammy&#8217;<\/span><\/li>\n<li data-prefix=\"mysql&gt;\"><mark>ORDER BY book_title<span class=\"token punctuation\">;<\/span><\/mark><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u51fa\u529b\u306f\u3001\u753b\u9762\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | book_title | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | Frankenstein | | Pride and Prejudice | | The Adventures of Huckleberry Finn | | The Picture of Dorian Gray | | The Time Machine | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ 5 rows in set (0.001 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u56de\u306f\u3001book_title\u5217\u306b\u57fa\u3065\u3044\u3066\u4e21\u65b9\u306eSELECT\u30af\u30a8\u30ea\u306e\u7d50\u679c\u304c\u30de\u30fc\u30b8\u3055\u308c\u305f\u9806\u5e8f\u3067\u7d50\u679c\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<h2>\u91cd\u8907\u3092\u4fdd\u6301\u3059\u308b\u305f\u3081\u306bUNION ALL\u3092\u4f7f\u7528\u3059\u308b\u3002<\/h2>\n<p>\u524d\u306e\u4f8b\u304c\u793a\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u3001UNION\u6f14\u7b97\u5b50\u306f\u7d50\u679c\u304b\u3089\u91cd\u8907\u884c\u3092\u81ea\u52d5\u7684\u306b\u9664\u53bb\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30af\u30a8\u30ea\u3067\u610f\u56f3\u3057\u305f\u7d50\u679c\u3084\u671f\u5f85\u3057\u305f\u52d5\u4f5c\u3068\u306f\u7570\u306a\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u30012022\u5e7410\u67081\u65e5\u306b\u8cfc\u5165\u307e\u305f\u306f\u8cc3\u501f\u3055\u308c\u305f\u66f8\u7c4d\u306b\u8208\u5473\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001\u4ee5\u524d\u3068\u540c\u3058\u3088\u3046\u306a\u4f8b\u306b\u5f93\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\">WHERE <span class=\"token function\">date<\/span> <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span><\/li>\n<li data-prefix=\"mysql&gt;\"><mark>UNION<\/mark><\/li>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_leases<\/li>\n<li data-prefix=\"mysql&gt;\">WHERE date_from <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span><\/li>\n<li data-prefix=\"mysql&gt;\">ORDER BY book_title<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4ee5\u4e0b\u306e\u7d50\u679c\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | book_title | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | Pride and Prejudice | | The Adventures of Huckleberry Finn | | The Picture of Dorian Gray | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ 3 rows in set (0.001 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u8fd4\u5374\u3055\u308c\u305f\u672c\u306e\u30bf\u30a4\u30c8\u30eb\u306f\u6b63\u3057\u3044\u3067\u3059\u304c\u3001\u7d50\u679c\u304b\u3089\u306f\u3053\u308c\u3089\u306e\u672c\u304c\u8cfc\u5165\u3055\u308c\u305f\u3082\u306e\u304b\u3001\u8cb8\u4e0e\u3055\u308c\u305f\u3082\u306e\u304b\u3001\u3042\u308b\u3044\u306f\u4e21\u65b9\u304b\u3092\u5224\u65ad\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u4e00\u90e8\u306e\u672c\u304c\u8cfc\u5165\u3068\u8cb8\u4e0e\u306e\u4e21\u65b9\u3067\u3042\u3063\u305f\u5834\u5408\u3001\u305d\u306e\u30bf\u30a4\u30c8\u30eb\u306fbook_purchases\u30c6\u30fc\u30d6\u30eb\u3068book_leases\u30c6\u30fc\u30d6\u30eb\u306e\u4e21\u65b9\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u305f\u3060\u3057\u3001UNION\u306b\u3088\u308b\u91cd\u8907\u884c\u306e\u53d6\u308a\u9664\u304d\u306b\u3088\u308a\u3001\u305d\u306e\u60c5\u5831\u306f\u7d50\u679c\u304b\u3089\u5931\u308f\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u5e78\u3044\u306b\u3082\u3001SQL\u306b\u306f\u3053\u306e\u52d5\u4f5c\u3092\u5909\u66f4\u3057\u3001\u91cd\u8907\u3057\u305f\u884c\u3092\u4fdd\u6301\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002 UNION ALL\u6f14\u7b97\u5b50\u3092\u4f7f\u7528\u3057\u3066\u3001\u91cd\u8907\u3057\u305f\u884c\u3092\u524a\u9664\u305b\u305a\u306b2\u3064\u306e\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u30de\u30fc\u30b8\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 UNION ALL\u306fUNION\u3068\u540c\u69d8\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u540c\u3058\u5024\u306e\u8907\u6570\u306e\u51fa\u73fe\u304c\u3042\u308b\u5834\u5408\u306f\u3001\u3059\u3079\u3066\u304c\u7d50\u679c\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u540c\u3058\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3001UNION\u3092UNION ALL\u306b\u5909\u66f4\u3057\u3066\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_purchases<\/li>\n<li data-prefix=\"mysql&gt;\">WHERE <span class=\"token function\">date<\/span> <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span><\/li>\n<li data-prefix=\"mysql&gt;\"><mark>UNION ALL<\/mark><\/li>\n<li data-prefix=\"mysql&gt;\">SELECT book_title FROM book_leases<\/li>\n<li data-prefix=\"mysql&gt;\">WHERE date_from <span class=\"token operator\">=<\/span> <span class=\"token string\">&#8216;2022-10-01&#8217;<\/span><\/li>\n<li data-prefix=\"mysql&gt;\">ORDER BY book_title<span class=\"token punctuation\">;<\/span><\/li>\n<\/ol>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4eca\u56de\u306f\u3001\u7d50\u679c\u306e\u30ea\u30b9\u30c8\u304c\u9577\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<div class=\"secondary-code-label\" title=\"Output\">Output<\/div>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | book_title | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | Pride and Prejudice | | The Adventures of Huckleberry Finn | | The Adventures of Huckleberry Finn | | The Picture of Dorian Gray | | The Picture of Dorian Gray | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ 5 rows in set (0.000 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u3075\u305f\u3064\u306e\u672c\u3001\u300e\u30cf\u30c3\u30af\u30eb\u30d9\u30ea\u30fc\u30fb\u30d5\u30a3\u30f3\u306e\u5192\u967a\u300f\u3068\u300e\u30c9\u30ea\u30a2\u30f3\u30fb\u30b0\u30ec\u30a4\u306e\u8096\u50cf\u300f\u304c\u691c\u7d22\u7d50\u679c\u306e\u4e2d\u30672\u56de\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u3053\u308c\u3089\u306e\u30bf\u30a4\u30c8\u30eb\u304cbook_purchases\u30c6\u30fc\u30d6\u30eb\u3068book_leases\u30c6\u30fc\u30d6\u30eb\u306e\u4e21\u65b9\u306b\u767b\u5834\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u91cd\u8907\u3057\u305f\u30a8\u30f3\u30c8\u30ea\u30fc\u306e\u5834\u5408\u306f\u3001\u305d\u306e\u65e5\u306b\u4e21\u65b9\u306e\u8cb8\u51fa\u3068\u8cfc\u5165\u304c\u884c\u308f\u308c\u305f\u3068\u60f3\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u91cd\u8907\u3092\u524a\u9664\u3057\u305f\u3044\u5834\u5408\u3068\u4fdd\u6301\u3057\u305f\u3044\u5834\u5408\u306b\u5fdc\u3058\u3066\u3001\u4ea4\u63db\u53ef\u80fd\u306b\u4f7f\u7528\u3067\u304d\u308bUNION\u304a\u3088\u3073UNION ALL\u30aa\u30da\u30ec\u30fc\u30bf\u30fc\u306e\u9593\u304b\u3089\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aUNION ALL\u3092\u5b9f\u884c\u3059\u308b\u65b9\u304cUNION\u3092\u5b9f\u884c\u3059\u308b\u3088\u308a\u3082\u901f\u304f\u306a\u308a\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u91cd\u8907\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u305f\u3081\u3067\u3059\u3002\u91cd\u8907\u884c\u3092\u542b\u307e\u306a\u3044\u3068\u308f\u304b\u3063\u3066\u3044\u308b2\u3064\u306eSELECT\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3092\u30de\u30fc\u30b8\u3059\u308b\u5834\u5408\u3001UNION ALL\u3092\u4f7f\u7528\u3059\u308b\u3068\u5927\u304d\u306a\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3067\u3082 noticeable \u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u304c\u5f97\u3089\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306b\u5f93\u3046\u3053\u3068\u3067\u3001UNION\u304a\u3088\u3073UNION ALL\u64cd\u4f5c\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u7d50\u679c\u3092\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306bWHERE\u53e5\u3092\u4f7f\u7528\u3057\u3001\u4e26\u3079\u66ff\u3048\u308b\u305f\u3081\u306bORDER BY\u53e5\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002\u6700\u5f8c\u306b\u3001SELECT\u6587\u304c\u7570\u306a\u308b\u30c7\u30fc\u30bf\u5f62\u5f0f\u3092\u8fd4\u3059\u5834\u5408\u306e\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u3084\u4e88\u671f\u3057\u306a\u3044\u632f\u308b\u821e\u3044\u306b\u3064\u3044\u3066\u5b66\u3073\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306f\u307b\u3068\u3093\u3069\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u52d5\u4f5c\u3059\u308b\u306f\u305a\u3067\u3059\u304c\u3001SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u305d\u308c\u305e\u308c\u56fa\u6709\u306e\u8a00\u8a9e\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\uff08\u3053\u308c\u3089\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u306f\u3001\u5f53\u793e\u306e\u30ac\u30a4\u30c9\u300cSQLite vs MySQL vs PostgreSQL\uff1a\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u306e\u6bd4\u8f03\u300d\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002\u5404\u30b3\u30de\u30f3\u30c9\u3068\u305d\u306e\u5b8c\u5168\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8\u306e\u3088\u308a\u8a73\u7d30\u306a\u8aac\u660e\u306b\u3064\u3044\u3066\u306f\u3001RDBMS\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3082\u3057SQL\u8a00\u8a9e\u306b\u95a2\u3059\u308b\u6982\u5ff5\u3084\u305d\u308c\u3068\u306e\u4f5c\u696d\u306b\u3064\u3044\u3066\u3055\u3089\u306b\u5b66\u3073\u305f\u3044\u5834\u5408\u306f\u3001\u300eSQL\u306e\u4f7f\u3044\u65b9\u30b7\u30ea\u30fc\u30ba\u300f\u306e\u4ed6\u306e\u30ac\u30a4\u30c9\u3082\u305c\u3072\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8457\u8005\u306f\u300cWrite for Donations\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001\u5bc4\u4ed8\u3092\u3059\u308b\u305f\u3081\u306b\u3001Diversity in Tech Fund\u3092\u9078\u3073\u307e\u3057\u305f\u3002 \u306f\u3058\u3081\u306b \u591a\u304f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u610f\u5473\u3068\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u60c5\u5831\u3092\u7570\u306a [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/sql\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9\" \/>\n<meta property=\"og:description\" content=\"\u8457\u8005\u306f\u300cWrite for Donations\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001\u5bc4\u4ed8\u3092\u3059\u308b\u305f\u3081\u306b\u3001Diversity in Tech Fund\u3092\u9078\u3073\u307e\u3057\u305f\u3002 \u306f\u3058\u3081\u306b \u591a\u304f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u610f\u5473\u3068\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u60c5\u5831\u3092\u7570\u306a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/sql\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-16T02:12:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-19T14:08:55+00:00\" \/>\n<meta name=\"author\" content=\"\u967d, \u5411\u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u967d, \u5411\u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"6\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/\",\"name\":\"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-01-16T02:12:08+00:00\",\"dateModified\":\"2024-03-19T14:08:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4aef6196128551a0f5d66db46c42866c\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4aef6196128551a0f5d66db46c42866c\",\"name\":\"\u967d, \u5411\u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ad96b120e219751fa368cbd7d2c48ca01b59185e6ed394449bac72614a760bf3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ad96b120e219751fa368cbd7d2c48ca01b59185e6ed394449bac72614a760bf3?s=96&d=mm&r=g\",\"caption\":\"\u967d, \u5411\u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/hinatasora\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/sql\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9\/","og_locale":"ja_JP","og_type":"article","og_title":"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9","og_description":"\u8457\u8005\u306f\u300cWrite for Donations\u30d7\u30ed\u30b0\u30e9\u30e0\u300d\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001\u5bc4\u4ed8\u3092\u3059\u308b\u305f\u3081\u306b\u3001Diversity in Tech Fund\u3092\u9078\u3073\u307e\u3057\u305f\u3002 \u306f\u3058\u3081\u306b \u591a\u304f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001\u610f\u5473\u3068\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u60c5\u5831\u3092\u7570\u306a [&hellip;]","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/sql\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-01-16T02:12:08+00:00","article_modified_time":"2024-03-19T14:08:55+00:00","author":"\u967d, \u5411\u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u967d, \u5411\u5b87","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"6\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/","name":"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-01-16T02:12:08+00:00","dateModified":"2024-03-19T14:08:55+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4aef6196128551a0f5d66db46c42866c"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL\u3067\u306e\u30e6\u30cb\u30aa\u30f3\u306e\u4f7f\u3044\u65b9"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/4aef6196128551a0f5d66db46c42866c","name":"\u967d, \u5411\u5b87","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ad96b120e219751fa368cbd7d2c48ca01b59185e6ed394449bac72614a760bf3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ad96b120e219751fa368cbd7d2c48ca01b59185e6ed394449bac72614a760bf3?s=96&d=mm&r=g","caption":"\u967d, \u5411\u5b87"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/hinatasora\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e3%81%ae%e3%83%a6%e3%83%8b%e3%82%aa%e3%83%b3%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":37460,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/187\/revisions\/37460"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}