{"id":139,"date":"2023-12-10T11:59:01","date_gmt":"2023-05-10T04:56:55","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"},"modified":"2025-07-31T21:04:48","modified_gmt":"2025-07-31T12:04:48","slug":"sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5"},"content":{"rendered":"<p>\u8457\u8005\u306f\u3001\u300cWrite for Donations\uff08\u5bc4\u4ed8\u3092\u52df\u308b\u305f\u3081\u306b\u66f8\u304f\uff09\u300d\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001Diversity in Tech Fund\u306b\u5bc4\u4ed8\u91d1\u3092\u8d08\u308b\u3053\u3068\u3092\u9078\u3073\u307e\u3057\u305f\u3002<\/p>\n<h3>\u3053\u3093\u306b\u3061\u306f\u3001\u6700\u521d\u306b\u7d39\u4ecb\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002<\/h3>\n<p>\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u69cb\u9020\u5316\u30af\u30a8\u30ea\u8a00\u8a9e\uff08SQL\uff09\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u306f\u3001\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u30c7\u30fc\u30bf\u3092\u683c\u7d0d\u3001\u7ba1\u7406\u3001\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002SQL\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u683c\u7d0d\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u305d\u306e\u307e\u307e\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>SQL\u3067\u306f\u3001\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u8a08\u7b97\u3084\u30c7\u30fc\u30bf\u306e\u64cd\u4f5c\u3092\u884c\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u95a2\u6570\u3092\u4f7f\u3063\u3066\u5546\u54c1\u306e\u4fa1\u683c\u3092\u6700\u3082\u8fd1\u3044\u30c9\u30eb\u306b\u4e38\u3081\u305f\u308a\u3001\u88fd\u54c1\u306e\u5e73\u5747\u8cfc\u5165\u6570\u3092\u8a08\u7b97\u3057\u305f\u308a\u3001\u7279\u5b9a\u306e\u8cfc\u5165\u54c1\u306e\u4fdd\u8a3c\u671f\u9593\u304c\u7d42\u4e86\u3059\u308b\u307e\u3067\u306e\u65e5\u6570\u3092\u6c42\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u3055\u307e\u3056\u307e\u306aSQL\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3001\u6570\u5b66\u7684\u306a\u8a08\u7b97\u3001\u6587\u5b57\u5217\u3068\u65e5\u4ed8\u306e\u64cd\u4f5c\u3001\u304a\u3088\u3073\u96c6\u8a08\u95a2\u6570\u3092\u4f7f\u7528\u3057\u305f\u8981\u7d04\u306e\u8a08\u7b97\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>\u524d\u63d0\u6761\u4ef6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306b\u5f93\u3046\u306b\u306f\u3001SQL\u30d9\u30fc\u30b9\u306e\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\uff08RDBMS\uff09\u3092\u5b9f\u884c\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\u3067\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\uff1a\u591a\u304f\u306eRDBMS\u306f\u72ec\u81ea\u306eSQL\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u8aac\u660e\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306f\u307b\u3068\u3093\u3069\u306eRDBMS\u3067\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001\u6a19\u6e96\u306eSQL\u69cb\u6587\u3067\u306f\u5236\u9650\u3055\u308c\u305f\u6570\u306e\u95a2\u6570\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u6a19\u6e96\u306e\u69cb\u6587\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u7570\u306a\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u3054\u3068\u306b\u7570\u306a\u308a\u307e\u3059\u3002MySQL\u4ee5\u5916\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u30c6\u30b9\u30c8\u3059\u308b\u3068\u3001\u6b63\u78ba\u306a\u69cb\u6587\u3084\u51fa\u529b\u304c\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u65e5\u672c\u8a9e\u306e\u8868\u73fe\u306b\u8a00\u3044\u63db\u3048\u307e\u3059\uff08\uff11\u3064\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\uff09\uff1a<br \/>\n\u95a2\u6570\u306e\u4f7f\u7528\u65b9\u6cd5\u3092\u7df4\u7fd2\u3059\u308b\u305f\u3081\u306b\u3001\u3044\u304f\u3064\u304b\u306e\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u304c\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30c6\u30fc\u30d6\u30eb\u3092\u6301\u3064\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3082\u5fc5\u8981\u3067\u3059\u3002\u672c\u30ac\u30a4\u30c9\u5168\u4f53\u3067\u4f7f\u7528\u3059\u308b\u4f8b\u3068\u3057\u3066\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3057\u3001\u30c6\u30b9\u30c8\u7528\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u300cMySQL\u3078\u306e\u63a5\u7d9a\u3068\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u300d\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>MySQL\u306b\u63a5\u7d9a\u3057\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\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>\u3082\u3057SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b7\u30b9\u30c6\u30e0\u304c\u30ea\u30e2\u30fc\u30c8\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30ed\u30fc\u30ab\u30eb\u30de\u30b7\u30f3\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u306bSSH\u3067\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>\u305d\u308c\u304b\u3089\u3001MySQL\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u958b\u304d\u3001MySQL\u30e6\u30fc\u30b6\u30fc\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u540d\u524d\u3067\u3042\u308b\u300csammy\u300d\u3092\u4f7f\u3063\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>\u672c\u5c4b\u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\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 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\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>\u66f8\u5e97\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u6b21\u306eUSE\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\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=\"$\">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>\u6b21\u306e\u51fa\u529b\u3092\u53d7\u3051\u53d6\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>Database changed<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3057\u305f\u5f8c\u3001\u305d\u306e\u4e2d\u3067\u30b5\u30f3\u30d7\u30eb\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u3067\u306f\u3001\u7570\u306a\u308b\u8457\u8005\u306b\u3088\u308b\u672c\u3092\u8ca9\u58f2\u3059\u308b\u67b6\u7a7a\u306e\u66f8\u5e97\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u66f8\u5e97\u306e\u30c6\u30fc\u30d6\u30eb\u5728\u5eab\u306b\u306f\u3001\u66f8\u7c4d\u306b\u95a2\u3059\u308b\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u5217\u304c\u4fdd\u6301\u3055\u308c\u307e\u3059\uff1a<\/p>\n<ul class=\"post-ul\">\n<li>book_id: This column holds the identifier for each book, 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>author: This column holds the book author\u2019s name, expressed using the varchar data type with a maximum of 50 characters.<\/li>\n<li>title: This column holds the purchased book\u2019s title, expressed using the varchar data type with a maximum of 200 characters.<\/li>\n<li>introduction_date: Using the date data type, this column holds the date each book was introduced by the bookstore.<\/li>\n<li>stock: This column holds the number of books the bookstore has in its inventory using the int integer data type.<\/li>\n<li>price: This column stores the book\u2019s retail price using the decimal data type with a maximum of 5 values before the decimal point and 2 values after it.<\/li>\n<\/ul>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\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 inventory <span class=\"token punctuation\">(<\/span><\/li>\n<li data-prefix=\"mysql&gt;\">book_id int,<\/li>\n<li data-prefix=\"mysql&gt;\">author varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">50<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">title varchar<span class=\"token punctuation\">(<\/span><span class=\"token number\">200<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">introduction_date date,<\/li>\n<li data-prefix=\"mysql&gt;\">stock int,<\/li>\n<li data-prefix=\"mysql&gt;\">price decimal<span class=\"token punctuation\">(<\/span><span class=\"token number\">5<\/span>, <span class=\"token number\">2<\/span><span class=\"token punctuation\">)<\/span>,<\/li>\n<li data-prefix=\"mysql&gt;\">PRIMARY KEY <span class=\"token punctuation\">(<\/span>book_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\u308c\u3070\u3001\u30c6\u30fc\u30d6\u30eb\u304c\u4f5c\u6210\u3055\u308c\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\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 inventory<\/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;Oscar Wilde&#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 number\">4<\/span>, <span class=\"token number\">20.83<\/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;Jane Austen&#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 number\">12<\/span>, <span class=\"token number\">42.13<\/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;Herbert George Wells&#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 number\">7<\/span>, <span class=\"token number\">21.99<\/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;Mary Shelley&#8217;<\/span>, <span class=\"token string\">&#8216;Frankenstein&#8217;<\/span>, <span class=\"token string\">&#8216;2022-07-23&#8217;<\/span>, <span class=\"token number\">9<\/span>, <span class=\"token number\">17.43<\/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;Mark Twain&#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 number\">14<\/span>, <span class=\"token number\">23.15<\/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>\u6307\u5b9a\u3055\u308c\u305f\u5024\u3092\u6301\u30645\u518a\u306e\u672c\u304c\u30a4\u30f3\u30d9\u30f3\u30c8\u30ea\u30fc\u30c6\u30fc\u30d6\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u308bINSERT INTO\u64cd\u4f5c\u304c\u884c\u308f\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u51fa\u529b\u306f\u3001\u3059\u3079\u3066\u306e5\u884c\u304c\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, 5 rows affected (0.00 sec) Records: 5 Duplicates: 0 Warnings: 0<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u305d\u308c\u3067\u306f\u3001\u6b8b\u308a\u306e\u30ac\u30a4\u30c9\u3092\u30d5\u30a9\u30ed\u30fc\u3057\u3001SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u6e96\u5099\u304c\u6574\u3044\u307e\u3057\u305f\u3002<\/p>\n<h2>SQL\u95a2\u6570\u306e\u7406\u89e3<\/h2>\n<p>\u95a2\u6570\u306f\u30011\u3064\u307e\u305f\u306f\u8907\u6570\u306e\u5024\u3092\u53d7\u3051\u53d6\u308a\u3001\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u8a08\u7b97\u3084\u5909\u63db\u3092\u884c\u3044\u3001\u65b0\u3057\u3044\u5024\u3092\u7d50\u679c\u3068\u3057\u3066\u8fd4\u3059\u540d\u524d\u4ed8\u304d\u306e\u5f0f\u3067\u3059\u3002SQL\u306e\u95a2\u6570\u306f\u3001\u6570\u5b66\u306e\u95a2\u6570\u306b\u4f3c\u305f\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002\u95a2\u6570log(x)\u306f\u3001\u3042\u308bx\u3092\u53d6\u308a\u3001x\u306e\u5bfe\u6570\u306e\u5024\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u901a\u5e38\u3001\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u5834\u5408\uff08\u5909\u63db\u305b\u305a\u306b\uff09\u3001SELECT\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3001\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3067\u5217\u540d\u3092\u6307\u5b9a\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5024\u3092\u8fd4\u3059\u3088\u3046\u8981\u6c42\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u3082\u3063\u3068\u3082\u9ad8\u4fa1\u306a\u3082\u306e\u304b\u3089\u3082\u3063\u3068\u3082\u5b89\u4fa1\u306a\u3082\u306e\u307e\u3067\u9806\u306b\u4e26\u3079\u66ff\u3048\u3089\u308c\u305f\u3001\u3059\u3079\u3066\u306e\u672c\u306e\u30bf\u30a4\u30c8\u30eb\u3068\u4fa1\u683c\u3092\u53d6\u5f97\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u5b9f\u884c\u3059\u308b\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 <mark>title<\/mark>, <mark>price<\/mark>, <mark>introduction_date<\/mark> FROM inventory ORDER BY price DESC<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\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u306b\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;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ | title | price | introduction_date | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ | Pride and Prejudice | 42.13 | 2022-10-04 | | The Adventures of Huckleberry Finn | 23.15 | 2022-10-01 | | The Time Machine | 21.99 | 2022-09-23 | | The Picture of Dorian Gray | 20.83 | 2022-10-01 | | Frankenstein | 17.43 | 2022-07-23 | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#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>\u3053\u306e\u6587\u3067\u306f\u3001\u30bf\u30a4\u30c8\u30eb\u3001\u4fa1\u683c\u3001\u304a\u3088\u3073\u5c0e\u5165\u65e5\u304c\u5217\u540d\u3068\u3057\u3066\u793a\u3055\u308c\u3001\u51fa\u529b\u7d50\u679c\u3067\u306f\u3001\u5404\u66f8\u7c4d\u3054\u3068\u306b\u305d\u308c\u3089\u306e\u5217\u304b\u3089\u53d6\u5f97\u3057\u305f\u5b8c\u5168\u306a\u66f8\u540d\u3001\u4fa1\u683c\u3001\u304a\u3088\u3073\u66f8\u7c4d\u304c\u66f8\u5e97\u306b\u5165\u8377\u3057\u305f\u65e5\u4ed8\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u63d0\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u4f55\u3089\u304b\u306e\u51e6\u7406\u3084\u64cd\u4f5c\u306e\u5f8c\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u5024\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u3082\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u6700\u3082\u8fd1\u3044\u30c9\u30eb\u306b\u5207\u308a\u4e0a\u3052\u305f\u66f8\u7c4d\u306e\u4fa1\u683c\u3001\u5927\u6587\u5b57\u3067\u8868\u793a\u3055\u308c\u305f\u66f8\u7c4d\u306e\u30bf\u30a4\u30c8\u30eb\u3001\u307e\u305f\u306f\u6708\u3084\u65e5\u3092\u542b\u307e\u306a\u3044\u7d39\u4ecb\u5e74\u3002\u3053\u3046\u3044\u3063\u305f\u5834\u5408\u306b\u306f\u3001\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>SQL\u95a2\u6570\u306f\u3001\u64cd\u4f5c\u3059\u308b\u30c7\u30fc\u30bf\u306e\u30bf\u30a4\u30d7\u306b\u5fdc\u3058\u3066\u3044\u304f\u3064\u304b\u306e\u30b0\u30eb\u30fc\u30d7\u306b\u5927\u5225\u3055\u308c\u307e\u3059\u3002\u4ee5\u4e0b\u306f\u6700\u3082\u4e00\u822c\u7684\u306b\u4f7f\u7528\u3055\u308c\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>Mathematical Functions: Functions operating on numerical values and performing computations, such as rounding, logarithms, square roots, or powers.<\/li>\n<li>String Manipulation Functions: Functions operating on strings and text fields that perform text transformations, such as converting the text to uppercase, trimming, or replacing words within the values.<\/li>\n<li>Date and Time Functions: Functions operating on fields holding dates. These functions perform computations and transformations, such as adding a number of days to the given date or taking just a year from the full date.<\/li>\n<li>Aggregate Functions: A special case of mathematical functions that operate on values coming from multiple rows, such as calculating an average price for all rows.<\/li>\n<\/ul>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aMySQL\u3092\u542b\u3080\u307b\u3068\u3093\u3069\u306e\u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3001SQL\u306e\u6a19\u6e96\u30bb\u30c3\u30c8\u306b\u8ffd\u52a0\u306e\u64cd\u4f5c\u3092\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u64cd\u4f5c\u306f\u3001\u305d\u308c\u305e\u308c\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306b\u56fa\u6709\u306e\u3082\u306e\u3067\u3059\u3002\u6a19\u6e96\u30bb\u30c3\u30c8\u5916\u306e\u591a\u304f\u306e\u95a2\u6570\u306f\u3001\u591a\u304f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u540c\u69d8\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u4e00\u90e8\u306f\u7279\u5b9a\u306eRDBMS\u306b\u5236\u9650\u3055\u308c\u3066\u304a\u308a\u3001\u305d\u306e\u56fa\u6709\u306e\u6a5f\u80fd\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u63d0\u4f9b\u3059\u308b\u95a2\u6570\u306b\u3064\u3044\u3066\u306f\u3001\u9078\u629e\u3057\u305f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002MySQL\u306e\u5834\u5408\u306f\u3001\u300cBuilt-In Function and Operator Reference\u300d\u3067\u8a73\u7d30\u3092\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n<p>\u4ee5\u4e0b\u306e\u4f8b\u306f\u3001SELECT\u30af\u30a8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u66f8\u5e97\u306e\u5728\u5eab\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4fa1\u683c\u5024\u3092\u5909\u66f4\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u67b6\u7a7a\u306e\u5b58\u5728\u3057\u306a\u3044\u95a2\u6570\u3067\u3042\u308bEXAMPLE\u306e\u4e00\u822c\u7684\u306a\u69cb\u6587\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT <mark>EXAMPLE<span class=\"token punctuation\">(<\/span>price<span class=\"token punctuation\">)<\/span> AS new_price<\/mark> FROM inventory<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>\u95a2\u6570\uff08\u4f8b\u3048\u3070EXAMPLE\uff09\u306f\u3001\u30ab\u30e9\u30e0\u540d\uff08price\uff09\u3092\u62ec\u5f27\u3067\u56f2\u3093\u3060\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002\u3053\u306e\u30af\u30a8\u30ea\u306e\u90e8\u5206\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u95a2\u6570EXAMPLE\u3092\u5b9f\u884c\u3057\u3001\u30ab\u30e9\u30e0price\u306e\u5024\u306b\u5bfe\u3057\u3066\u306e\u64cd\u4f5c\u7d50\u679c\u3092\u8fd4\u3059\u3053\u3068\u3092\u6307\u793a\u3057\u307e\u3059\u3002AS new_price\u306f\u3001\u30af\u30a8\u30ea\u306e\u671f\u9593\u4e2d\u306b\u8a08\u7b97\u3055\u308c\u305f\u5024\u306b\u4e00\u6642\u7684\u306a\u540d\u524d\uff08new_price\uff09\u3092\u5272\u308a\u5f53\u3066\u308b\u305f\u3081\u3001\u51fa\u529b\u3067\u95a2\u6570\u306e\u7d50\u679c\u3092\u533a\u5225\u3057\u3001WHERE\u3084ORDER BY\u7bc0\u3092\u4f7f\u7528\u3057\u3066\u8a08\u7b97\u3055\u308c\u305f\u5024\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u4e00\u822c\u7684\u306b\u4f7f\u7528\u3055\u308c\u308b\u8a08\u7b97\u3092\u884c\u3046\u305f\u3081\u306b\u6570\u5b66\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6570\u5b66\u7684\u306a\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b<\/h2>\n<p>\u6570\u5b66\u95a2\u6570\u306f\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306e\u66f8\u7c4d\u306e\u4fa1\u683c\u3084\u5728\u5eab\u6570\u306a\u3069\u306e\u6570\u5024\u306b\u4f5c\u7528\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u3067\u8a08\u7b97\u3092\u884c\u3044\u3001\u7d50\u679c\u3092\u8981\u4ef6\u306b\u5408\u308f\u305b\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30e9\u30a6\u30f3\u30c7\u30a3\u30f3\u30b0\u306fSQL\u3067\u6700\u3082\u3088\u304f\u4f7f\u7528\u3055\u308c\u308b\u6570\u5b66\u95a2\u6570\u306e\u4e00\u3064\u3067\u3059\u3002\u5168\u3066\u306e\u672c\u306e\u4fa1\u683c\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u6700\u5bc4\u308a\u306e\u6574\u6570\u30c9\u30eb\u306b\u4e38\u3081\u3089\u308c\u305f\u5024\u306b\u8208\u5473\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u30e9\u30a6\u30f3\u30c9\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u95a2\u6570\u306f\u4e38\u3081\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\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 title, price, <mark>ROUND<span class=\"token punctuation\">(<\/span>price<span class=\"token punctuation\">)<\/span> AS rounded_price<\/mark> FROM inventory<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\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;+ | title | price | rounded_price | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;+ | The Picture of Dorian Gray | 20.83 | 21 | | Pride and Prejudice | 42.13 | 42 | | The Time Machine | 21.99 | 22 | | Frankenstein | 17.43 | 17 | | The Adventures of Huckleberry Finn | 23.15 | 23 | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#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>\u30af\u30a8\u30ea\u306f\u3001\u30bf\u30a4\u30c8\u30eb\u3068\u4fa1\u683c\u306e\u5217\u304b\u3089\u5024\u3092\u62bd\u51fa\u3057\u3001ROUND(price)\u95a2\u6570\u306e\u7d50\u679c\u3092\u6301\u3064\u4e00\u6642\u7684\u306arounded_price\u5217\u3068\u4e00\u7dd2\u306b\u8fd4\u3057\u307e\u3059\u3002\u3053\u306e\u95a2\u6570\u306f1\u3064\u306e\u5f15\u6570\u3001\u5217\u540d\uff08\u3053\u306e\u5834\u5408\u306f\u4fa1\u683c\uff09\u3092\u53d6\u308a\u3001\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u305d\u306e\u5217\u306e\u5024\u3092\u6700\u3082\u8fd1\u3044\u6574\u6570\u5024\u306b\u4e38\u3081\u305f\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4e38\u3081\u308b\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306e\u6841\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u8ffd\u52a0\u306e\u5f15\u6570\u3084\u3001\u5358\u4e00\u306e\u5217\u540d\u3067\u306f\u306a\u304f\u7b97\u8853\u6f14\u7b97\u3082\u53d7\u3051\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u4e38\u3081\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<ol>\n<li data-prefix=\"mysql&gt;\">SELECT title, price, <mark>ROUND<span class=\"token punctuation\">(<\/span>price * stock, <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> AS stock_price<\/mark> FROM inventory<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\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\u3002 (Anata wa shita no shutsuryoku 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>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | title | stock | price | stock_price | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;-+ | The Picture of Dorian Gray | 4 | 20.83 | 83.3 | | Pride and Prejudice | 12 | 42.13 | 505.6 | | The Time Machine | 7 | 21.99 | 153.9 | | Frankenstein | 9 | 17.43 | 156.9 | | The Adventures of Huckleberry Finn | 14 | 23.15 | 324.1 | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#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>`ROUND(\u4fa1\u683c * \u5728\u5eab\u6570, 1)`\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u307e\u305a\u5358\u4e00\u306e\u672c\u306e\u4fa1\u683c\u3092\u5728\u5eab\u306e\u518a\u6570\u3067\u4e57\u7b97\u3057\u3001\u305d\u306e\u7d50\u679c\u306e\u4fa1\u683c\u3092\u5c0f\u6570\u70b9\u4ee5\u4e0b1\u6841\u3067\u56db\u6368\u4e94\u5165\u3057\u307e\u3059\u3002\u305d\u306e\u7d50\u679c\u306f\u3001stock_price \u3068\u3044\u3046\u4e00\u6642\u7684\u306a\u5217\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>MySQL\u306b\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u4ed6\u306e\u6570\u5b66\u95a2\u6570\u306b\u306f\u3001\u4e09\u89d2\u95a2\u6570\u3001\u5e73\u65b9\u6839\u3001\u7d2f\u4e57\u3001\u5bfe\u6570\u3001\u6307\u6570\u95a2\u6570\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002\u6570\u5b66\u95a2\u6570\u3092SQL\u3067\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001SQL\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u300c\u6570\u5b66\u7684\u306a\u5f0f\u3068\u96c6\u7d04\u95a2\u6570\u306e\u4f7f\u7528\u65b9\u6cd5\u300d\u3067\u8a73\u3057\u304f\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001SQL\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u64cd\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<h2>\u6587\u5b57\u5217\u64cd\u4f5c\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066<\/h2>\n<p>SQL\u306e\u6587\u5b57\u5217\u64cd\u4f5c\u95a2\u6570\u306f\u3001SQL\u30af\u30a8\u30ea\u306e\u51e6\u7406\u6642\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u4fdd\u6301\u3059\u308b\u5217\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u95a2\u6570\u306f\u3001\u4f8b\u3048\u3070\u3001\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u5909\u63db\u3001\u8907\u6570\u306e\u5217\u304b\u3089\u30c7\u30fc\u30bf\u3092\u9023\u7d50\u3059\u308b\u3001\u307e\u305f\u306f\u691c\u7d22\u3068\u7f6e\u63db\u306e\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u672c\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u3059\u3079\u3066\u5c0f\u6587\u5b57\u306b\u5909\u63db\u3057\u3066\u53d6\u5f97\u3057\u3001\u6587\u5b57\u5217\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3057\u59cb\u3081\u307e\u3059\u3002\u6b21\u306e\u6587\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 <mark>LOWER<span class=\"token punctuation\">(<\/span>title<span class=\"token punctuation\">)<\/span> AS title_lowercase<\/mark> FROM inventory<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;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | title_lowercase | +&#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.001 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>SQL\u95a2\u6570\u3067\u3042\u308bLOWER\u306f\u3001\u5358\u4e00\u306e\u5f15\u6570\u3092\u53d6\u308a\u3001\u305d\u306e\u5185\u5bb9\u3092\u5c0f\u6587\u5b57\u306b\u5909\u63db\u3057\u307e\u3059\u3002\u7d50\u679c\u306e\u30c7\u30fc\u30bf\u306f\u3001\u4e00\u6642\u7684\u306a\u5217\u3068\u3057\u3066title_lowercase\u3068\u3044\u3046\u540d\u524d\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3001\u3059\u3079\u3066\u306e\u8457\u8005\u3092\u5927\u6587\u5b57\u306b\u5909\u63db\u3057\u3066\u53d6\u5f97\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4ee5\u4e0b\u306eSQL\u30af\u30a8\u30ea\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>UPPER<span class=\"token punctuation\">(<\/span>author<span class=\"token punctuation\">)<\/span> AS author_uppercase<\/mark> FROM inventory<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\u9001\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;-+ | author_uppercase | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+ | OSCAR WILDE | | JANE AUSTEN | | HERBERT GEORGE WELLS | | MARY SHELLEY | | MARK TWAIN | +&#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>LOWER\u95a2\u6570\u306e\u4ee3\u308f\u308a\u306b\u3001\u5927\u6587\u5b57\u306b\u5909\u63db\u3059\u308bUPPER\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002\u4e21\u65b9\u306e\u95a2\u6570\u306f\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u969b\u306b\u6587\u5b57\u306e\u5927\u6587\u5b57\u30fb\u5c0f\u6587\u5b57\u306e\u4e00\u8cab\u6027\u304c\u5fc5\u8981\u306a\u5834\u5408\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u5225\u306e\u4fbf\u5229\u306a\u6587\u5b57\u5217\u64cd\u4f5c\u95a2\u6570\u306fCONCAT\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u306f\u30c6\u30ad\u30b9\u30c8\u5024\u3092\u8907\u6570\u306e\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308a\u3001\u305d\u308c\u3089\u3092\u7d50\u5408\u3057\u307e\u3059\u3002\u66f8\u7c4d\u306e\u8457\u8005\u3068\u30bf\u30a4\u30c8\u30eb\u30921\u3064\u306e\u5217\u306b\u7d44\u307f\u5408\u308f\u305b\u3066\u53d6\u5f97\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u306e\u305f\u3081\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\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 <mark>CONCAT<span class=\"token punctuation\">(<\/span>author, <span class=\"token string\">&#8216;: &#8216;<\/span>, title<span class=\"token punctuation\">)<\/span> AS full_title<\/mark> FROM inventory<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\u306e\u6587\u306f\u3001\u6b21\u306e\u51fa\u529b\u3092\u8fd4\u3057\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;+ | full_title | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ | Oscar Wilde: The Picture of Dorian Gray | | Jane Austen: Pride and Prejudice | | Herbert George Wells: The Time Machine | | Mary Shelley: Frankenstein | | Mark Twain: The Adventures of Huckleberry Finn | +&#8212;&#8212;&#8212;&#8212;&#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>CONCAT\u95a2\u6570\u306f\u8907\u6570\u306e\u6587\u5b57\u5217\u3092\u9023\u7d50\u3057\u30013\u3064\u306e\u5f15\u6570\u3067\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002\u6700\u521d\u306e\u5f15\u6570\u306e&#8221;author&#8221;\u306f\u3001\u8457\u8005\u306e\u540d\u524d\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5217\u3092\u6307\u3057\u307e\u3059\u30022\u756a\u76ee\u306e\u5f15\u6570\u3067\u3042\u308b&#8221;:&#8221;\u306f\u3001\u8457\u8005\u3068\u66f8\u7c4d\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u30b3\u30ed\u30f3\u3067\u533a\u5207\u308b\u305f\u3081\u306e\u4efb\u610f\u306e\u6587\u5b57\u5217\u5024\u3067\u3059\u3002\u6700\u5f8c\u306e\u5f15\u6570\u3067\u3042\u308b&#8221;title&#8221;\u306f\u3001\u66f8\u7c4d\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5217\u3092\u6307\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30af\u30a8\u30ea\u306e\u7d50\u679c\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306b\u3088\u3063\u3066\u76f4\u63a5\u9023\u7d50\u3055\u308c\u305f\u5358\u4e00\u306e\u4e00\u6642\u7684\u306a\u300cfull_title\u300d\u3068\u3044\u3046\u5217\u306b\u8457\u8005\u3068\u30bf\u30a4\u30c8\u30eb\u304c\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>MySQL\u306b\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u308b\u4ed6\u306e\u6587\u5b57\u5217\u95a2\u6570\u306b\u306f\u3001\u6587\u5b57\u5217\u306e\u691c\u7d22\u3068\u7f6e\u63db\u3001\u90e8\u5206\u6587\u5b57\u5217\u306e\u53d6\u5f97\u3001\u6587\u5b57\u5217\u5024\u306e\u30d1\u30c7\u30a3\u30f3\u30b0\u3068\u30c8\u30ea\u30df\u30f3\u30b0\u3001\u6b63\u898f\u8868\u73fe\u306e\u9069\u7528\u306a\u3069\u306e\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002\u8907\u6570\u306e\u5024\u3092\u9023\u7d50\u3059\u308b\u305f\u3081\u306eSQL\u95a2\u6570\u306e\u4f7f\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001\u300cHow To Manipulate Data with CAST Functions and Concatenation Expressions in SQL\u300d\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u8a73\u3057\u304f\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002MySQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u300cString Functions and Operators\u300d\u3082\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u65e5\u4ed8\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306bSQL\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>\u65e5\u4ed8\u3068\u6642\u523b\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3002<\/h2>\n<p>SQL\u306b\u304a\u3051\u308b\u65e5\u4ed8\u3068\u6642\u9593\u306e\u6a5f\u80fd\u306f\u3001SQL\u30af\u30a8\u30ea\u306e\u51e6\u7406\u6642\u306b\u65e5\u4ed8\u3084\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u4fdd\u6301\u3059\u308b\u5217\u306e\u5024\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u6a5f\u80fd\u306f\u3001\u65e5\u4ed8\u60c5\u5831\u306e\u4e00\u90e8\u3092\u62bd\u51fa\u3057\u305f\u308a\u3001\u65e5\u4ed8\u6f14\u7b97\u3092\u884c\u3063\u305f\u308a\u3001\u65e5\u4ed8\u3084\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u5fc5\u8981\u306a\u51fa\u529b\u5f62\u5f0f\u306b\u66f8\u5f0f\u8a2d\u5b9a\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u51fa\u529b\u306b\u5358\u4e00\u306e\u65e5\u4ed8\u5217\u3092\u6301\u3064\u4ee3\u308f\u308a\u306b\u3001\u672c\u306e\u7d39\u4ecb\u65e5\u3092\u5e74\u3001\u6708\u3001\u65e5\u3054\u3068\u306b\u5225\u3005\u306b\u5206\u5272\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u4eee\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\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 introduction_date, <mark>YEAR<span class=\"token punctuation\">(<\/span>introduction_date<span class=\"token punctuation\">)<\/span> as year<\/mark>, <mark>MONTH<span class=\"token punctuation\">(<\/span>introduction_date<span class=\"token punctuation\">)<\/span> as month<\/mark>, <mark>DAY<span class=\"token punctuation\">(<\/span>introduction_date<span class=\"token punctuation\">)<\/span> as day<\/mark> FROM inventory<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>\u3042\u306a\u305f\u306f\u3053\u306e\u51fa\u529b\u3092\u53d7\u3051\u53d6\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;+ | introduction_date | year | month | day | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;+ | 2022-10-01 | 2022 | 10 | 1 | | 2022-10-04 | 2022 | 10 | 4 | | 2022-09-23 | 2022 | 9 | 23 | | 2022-07-23 | 2022 | 7 | 23 | | 2022-10-01 | 2022 | 10 | 1 | +&#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>\u3053\u306eSQL\u6587\u306f\u3001YEAR\u3001MONTH\u3001DAY\u3068\u3044\u30463\u3064\u306e\u500b\u5225\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u306e\u95a2\u6570\u306f\u3001\u65e5\u4ed8\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u5217\u540d\u3092\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308a\u3001\u5b8c\u5168\u306a\u65e5\u4ed8\u304b\u3089\u5e74\u3001\u6708\u3001\u307e\u305f\u306f\u65e5\u306e\u4e00\u90e8\u3060\u3051\u3092\u62bd\u51fa\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001SQL\u30af\u30a8\u30ea\u5185\u3067\u500b\u5225\u306e\u65e5\u4ed8\u306e\u65ad\u7247\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3082\u3046\u3072\u3068\u3064\u306e\u4fbf\u5229\u306a\u65e5\u4ed8\u64cd\u4f5c\u95a2\u6570\u306fDATEDIFF\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3068\u30012\u3064\u306e\u65e5\u4ed8\u9593\u306e\u65e5\u6570\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4eca\u5ea6\u306f\u3001\u5404\u672c\u306e\u5c0e\u5165\u65e5\u304b\u3089\u73fe\u5728\u65e5\u307e\u3067\u306e\u7d4c\u904e\u65e5\u6570\u3092\u78ba\u8a8d\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\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 introduction_date, <mark>DATEDIFF<span class=\"token punctuation\">(<\/span>introduction_date, CURRENT_DATE<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">))<\/span> AS days_since<\/mark> FROM inventory<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;&#8212;-+&#8212;&#8212;&#8212;&#8212;+ | introduction_date | days_since | +&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;+ | 2022-10-01 | -30 | | 2022-10-04 | -27 | | 2022-09-23 | -38 | | 2022-07-23 | -100 | | 2022-10-01 | -30 | +&#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>DATEDIFF\u95a2\u6570\u306f\u30012\u3064\u306e\u5f15\u6570\u3092\u53d7\u3051\u53d6\u308a\u307e\u3059\uff1a\u958b\u59cb\u65e5\u3068\u7d42\u4e86\u65e5\u3067\u3059\u3002DATEDIFF\u95a2\u6570\u306f\u3001\u3053\u308c\u30892\u3064\u306e\u6642\u70b9\u3092\u5206\u96e2\u3059\u308b\u65e5\u6570\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002\u7d50\u679c\u306f\u3001\u7d42\u4e86\u65e5\u304c\u524d\u306e\u5834\u5408\u306b\u306f\u8ca0\u306e\u6570\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u6700\u521d\u306e\u5f15\u6570\u306f\u5728\u5eab\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u65e5\u4ed8\u3092\u4fdd\u6301\u3057\u3066\u3044\u308bintroduction_date\u5217\u540d\u3067\u3059\u30022\u3064\u76ee\u306e\u5f15\u6570\u306f\u3001\u73fe\u5728\u306e\u30b7\u30b9\u30c6\u30e0\u65e5\u4ed8\u3092\u8868\u3059\u5225\u306e\u95a2\u6570\u3067\u3042\u308bCURRENT_DATE\u3067\u3059\u3002\u3053\u306e\u30af\u30a8\u30ea\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u3053\u306e2\u3064\u306e\u6642\u70b9\u306e\u9593\u306e\u65e5\u6570\u304c\u53d6\u5f97\u3055\u308c\u3001\u7d50\u679c\u304cdays_since\u3068\u3044\u3046\u4e00\u6642\u5217\u306b\u5165\u308c\u3089\u308c\u307e\u3059\u3002<\/p>\n<div class=\"post-conf-note\">\n<p class=\"post-conf-desc\">Note<\/p>\n<div>\u6ce8\u610f\uff1aDATEDIFF\u306f\u516c\u5f0f\u306eSQL\u6a19\u6e96\u95a2\u6570\u306e\u4e00\u90e8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u591a\u304f\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u3053\u306e\u95a2\u6570\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u69cb\u6587\u306f\u7570\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306fMySQL\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u306a\u69cb\u6587\u306b\u5f93\u3063\u3066\u3044\u307e\u3059\u3002<\/div>\n<\/div>\n<p>MySQL\u306b\u7d44\u307f\u8fbc\u307e\u308c\u305f\u305d\u306e\u4ed6\u306e\u65e5\u4ed8\u64cd\u4f5c\u95a2\u6570\u306b\u306f\u3001\u65e5\u4ed8\u3084\u6642\u9593\u306e\u9593\u9694\u306e\u52a0\u7b97\u3068\u6e1b\u7b97\u3001\u7570\u306a\u308b\u8a00\u8a9e\u5f62\u5f0f\u306b\u5bfe\u3059\u308b\u65e5\u4ed8\u306e\u66f8\u5f0f\u8a2d\u5b9a\u3001\u65e5\u3068\u6708\u306e\u540d\u524d\u306e\u53d6\u5f97\u3001\u65b0\u3057\u3044\u65e5\u4ed8\u5024\u306e\u4f5c\u6210\u306a\u3069\u304c\u3042\u308a\u307e\u3059\u3002SQL\u3067\u65e5\u4ed8\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001\u300cHow To Work with Dates and Times in SQL\u300d\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u8a73\u3057\u304f\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001MySQL\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u300cDate and Time Functions\u300d\u3082\u53c2\u8003\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u96c6\u8a08\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h2>\u96c6\u8a08\u95a2\u6570\u306e\u4f7f\u7528<\/h2>\n<p>\u3053\u308c\u307e\u3067\u306e\u3059\u3079\u3066\u306e\u4f8b\u3067\u306f\u3001SQL\u306e\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u30011\u3064\u306e\u884c\u5185\u306e\u500b\u3005\u306e\u5217\u5024\u3001\u3064\u307e\u308a\u66f8\u5e97\u306b\u304a\u3051\u308b1\u518a\u306e\u672c\u3092\u8868\u3059\u3082\u306e\u306b\u5909\u63db\u3084\u8a08\u7b97\u3092\u9069\u7528\u3057\u307e\u3057\u305f\u3002SQL\u306f\u3001\u8907\u6570\u306e\u884c\u3092\u307e\u305f\u304c\u3063\u305f\u6570\u5024\u8a08\u7b97\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3001\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u5168\u4f53\u306b\u95a2\u3059\u308b\u96c6\u8a08\u60c5\u5831\u3092\u898b\u3064\u3051\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>SQL\u3067\u306e\u4e3b\u8981\u306a\u96c6\u7d04\u95a2\u6570\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ul class=\"post-ul\">\n<li>AVG for the average of the values the calculations are performed on.<\/li>\n<li>COUNT for the number of values the calculations are performed on.<\/li>\n<li>MAX for the maximum value.<\/li>\n<li>MIN for the minimum value.<\/li>\n<li>SUM for the sum of all values.<\/li>\n<\/ul>\n<p>SELECT\u30af\u30a8\u30ea\u306b\u306f\u8907\u6570\u306e\u96c6\u8a08\u95a2\u6570\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u66f8\u5e97\u306b\u63b2\u8f09\u3055\u308c\u3066\u3044\u308b\u66f8\u7c4d\u306e\u6570\u3001\u5229\u7528\u53ef\u80fd\u306a\u66f8\u7c4d\u306e\u6700\u9ad8\u4fa1\u683c\u3001\u5168\u30ab\u30bf\u30ed\u30b0\u306e\u5e73\u5747\u4fa1\u683c\u3092\u78ba\u8a8d\u3057\u305f\u3044\u3068\u601d\u3063\u305f\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u6587\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 <mark>COUNT<span class=\"token punctuation\">(<\/span>title<span class=\"token punctuation\">)<\/span> AS count<\/mark>, <mark>MAX<span class=\"token punctuation\">(<\/span>price<span class=\"token punctuation\">)<\/span> AS max_price<\/mark>, <mark>AVG<span class=\"token punctuation\">(<\/span>price<span class=\"token punctuation\">)<\/span> AS avg_price<\/mark> FROM inventory<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\u306e\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u51fa\u529b\u3092\u8fd4\u3057\u307e\u3059\u3002 (Kono sut\u0113tomento wa ika no shutsuryoku o kaeshimasu)<\/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;&#8211;+&#8212;&#8212;&#8212;&#8211;+ | count | max_price | avg_price | +&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+ | 5 | 42.13 | 25.106000 | +&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8211;+ 1 row in set (0.001 sec)<\/p>\n<pre class=\"post-pre\"><code><\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30af\u30a8\u30ea\u306f\u540c\u6642\u306b3\u3064\u306e\u96c6\u8a08\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002COUNT\u95a2\u6570\u306f\u30af\u30a8\u30ea\u304c\u53c2\u7167\u3059\u308b\u884c\u6570\u3092\u30ab\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u30bf\u30a4\u30c8\u30eb\u304c\u5f15\u6570\u3068\u3057\u3066\u6e21\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5217\u3054\u3068\u306b\u30c1\u30a7\u30c3\u30af\u3055\u308c\u308b\u884c\u6570\u304c\u540c\u3058\u3067\u3042\u308c\u3070\u3001\u4ed6\u306e\u4efb\u610f\u306e\u5217\u540d\u3082\u5f15\u6570\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002MAX\u95a2\u6570\u306f\u4fa1\u683c\u5217\u304b\u3089\u6700\u5927\u5024\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u8a08\u7b97\u306f\u305d\u306e\u5217\u306e\u5024\u306b\u5bfe\u3057\u3066\u884c\u308f\u308c\u308b\u305f\u3081\u3001\u5217\u540d\u304c\u91cd\u8981\u3067\u3059\u3002\u6700\u5f8c\u306e\u95a2\u6570\u306fAVG\u95a2\u6570\u3067\u3001\u4fa1\u683c\u5217\u306e\u3059\u3079\u3066\u306e\u4fa1\u683c\u306e\u5e73\u5747\u3092\u8a08\u7b97\u3057\u307e\u3059\u3002<\/p>\n<p>\u96c6\u8a08\u95a2\u6570\u3092\u3053\u306e\u3088\u3046\u306b\u4f7f\u7528\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u96c6\u8a08\u8a08\u7b97\u306e\u5024\u3092\u8868\u3059\u4eee\u306e\u5217\u3092\u6301\u3063\u305f\u5358\u4e00\u306e\u884c\u3092\u8fd4\u3057\u307e\u3059\u3002\u30bd\u30fc\u30b9\u306e\u884c\u306f\u5185\u90e8\u7684\u306b\u8a08\u7b97\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u304c\u3001\u30af\u30a8\u30ea\u3092\u901a\u3058\u3066\u8fd4\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u5168\u3066\u306e\u884c\u3092\u4e00\u62ec\u3057\u3066\u8003\u616e\u3057\u3001\u5728\u5eab\u30c6\u30fc\u30d6\u30eb\u304b\u3089\u7d71\u8a08\u5024\u3092\u8a08\u7b97\u3059\u308b\u305f\u3081\u306b\u96c6\u8a08\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>SQL\u3092\u4f7f\u3048\u3070\u3001\u30c6\u30fc\u30d6\u30eb\u5185\u306e\u884c\u3092\u30b0\u30eb\u30fc\u30d7\u306b\u5206\u3051\u3066\u3001\u305d\u306e\u30b0\u30eb\u30fc\u30d7\u3054\u3068\u306b\u96c6\u8a08\u5024\u3092\u8a08\u7b97\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u7570\u306a\u308b\u8457\u8005\u306e\u66f8\u7c4d\u306e\u5e73\u5747\u4fa1\u683c\u3092\u8a08\u7b97\u3057\u3066\u3001\u3069\u306e\u8457\u8005\u304c\u6700\u3082\u9ad8\u4fa1\u306a\u30bf\u30a4\u30c8\u30eb\u3092\u51fa\u7248\u3057\u3066\u3044\u308b\u304b\u8abf\u3079\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u3088\u3046\u306a\u8a08\u7b97\u306e\u305f\u3081\u306b\u884c\u3092\u30b0\u30eb\u30fc\u30d7\u5316\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001\u300cHow To Use GROUP BY and ORDER BY in SQL\u300d\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u8a73\u3057\u304f\u5b66\u3076\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u300cHow To Use Mathematical Expressions and Aggregate Functions in SQL\u300d\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u53c2\u8003\u306b\u3057\u3066\u3001\u96c6\u8a08\u95a2\u6570\u306e\u4f7f\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8a73\u3057\u304f\u5b66\u3076\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u7d50\u8ad6<\/h2>\n<p>\u3053\u306e\u30ac\u30a4\u30c9\u306b\u5f93\u3046\u3053\u3068\u3067\u3001SQL\u95a2\u6570\u3068\u306f\u4f55\u304b\u3001\u305d\u3057\u3066\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u6570\u5024\u3001\u6587\u5b57\u5217\u3001\u65e5\u4ed8\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5\u3092\u5b66\u3073\u307e\u3057\u305f\u3002\u6570\u5024\u306e\u5024\u3092\u4e38\u3081\u308b\u305f\u3081\u306bROUND\u3092\u4f7f\u7528\u3057\u3001\u8907\u6570\u306e\u5217\u3092\u7d50\u5408\u3059\u308b\u305f\u3081\u306bCONCAT\u3092\u4f7f\u7528\u3057\u30012\u3064\u306e\u6642\u9593\u70b9\u306e\u9593\u306e\u65e5\u6570\u3092\u8a08\u7b97\u3059\u308b\u305f\u3081\u306bDATEDIFF\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002\u3055\u3089\u306b\u3001COUNT\u3001SUM\u3001AVG\u306a\u3069\u306e\u96c6\u8a08\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3066\u8907\u6570\u306e\u884c\u306b\u308f\u305f\u308b\u96c6\u8a08\u3092\u751f\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u306e\u64cd\u4f5c\u3068\u8a08\u7b97\u306e\u4e00\u90e8\u3092\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a8\u30f3\u30b8\u30f3\u306b\u30aa\u30d5\u30ed\u30fc\u30c9\u3059\u308b\u305f\u3081\u306b\u3001\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001\u305d\u306e\u76ee\u7684\u306e\u305f\u3081\u306b\u95a2\u6570\u306e\u57fa\u672c\u306e\u307f\u3092\u30ab\u30d0\u30fc\u3057\u3066\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u3092\u9811\u5f37\u306b\u53d6\u5f97\u3057\u3001\u5206\u6790\u3059\u308b\u305f\u3081\u306b\u3001WHERE\u53e5\u3068GROUP BY\u3068ORDER BY\u306e\u4f7f\u7528\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8a18\u8ff0\u3055\u308c\u305f\u6761\u4ef6\u4ed8\u304d\u30af\u30a8\u30ea\u3068\u95a2\u6570\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u306b\u793a\u3055\u308c\u3066\u3044\u308b\u30b3\u30de\u30f3\u30c9\u306f\u3001\u307b\u3068\u3093\u3069\u306e\u95a2\u4fc2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u6a5f\u80fd\u3059\u308b\u306f\u305a\u3067\u3059\u304c\u3001\u3059\u3079\u3066\u306eSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u72ec\u81ea\u306e\u8a00\u8a9e\u5b9f\u88c5\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u5404\u30b3\u30de\u30f3\u30c9\u3068\u305d\u306e\u5168\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306b\u3064\u3044\u3066\u306f\u3001DBMS\u306e\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3082\u3057SQL\u8a00\u8a9e\u3084\u305d\u308c\u306b\u95a2\u9023\u3059\u308b\u69d8\u3005\u306a\u6982\u5ff5\u306b\u3064\u3044\u3066\u3082\u3063\u3068\u5b66\u3073\u305f\u3044\u5834\u5408\u306f\u3001How To Use SQL\u30b7\u30ea\u30fc\u30ba\u306e\u4ed6\u306e\u30ac\u30a4\u30c9\u3092\u3054\u89a7\u3044\u305f\u3060\u304f\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8457\u8005\u306f\u3001\u300cWrite for Donations\uff08\u5bc4\u4ed8\u3092\u52df\u308b\u305f\u3081\u306b\u66f8\u304f\uff09\u300d\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e00\u74b0\u3068\u3057\u3066\u3001Diversity in Tech Fund\u306b\u5bc4\u4ed8\u91d1\u3092\u8d08\u308b\u3053\u3068\u3092\u9078\u3073\u307e\u3057\u305f\u3002 \u3053\u3093\u306b\u3061\u306f\u3001\u6700\u521d\u306b\u7d39\u4ecb\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14,26],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-14","tag-26"],"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\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\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\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/sql\u3067\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-10T04:56:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T12:04:48+00:00\" \/>\n<meta name=\"author\" content=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\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=\"\u82bd\u4f9d, \u96e8\u591c\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"32\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%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\",\"name\":\"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-05-10T04:56:55+00:00\",\"dateModified\":\"2025-07-31T12:04:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27\"},\"description\":\"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\"}]},{\"@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\/aeb60a7861f2f002b54c66bd65bc6c27\",\"name\":\"\u82bd\u4f9d, \u96e8\u591c\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g\",\"caption\":\"\u82bd\u4f9d, \u96e8\u591c\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","description":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","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\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/","og_locale":"ja_JP","og_type":"article","og_title":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5","og_description":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/sql\u3067\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-05-10T04:56:55+00:00","article_modified_time":"2025-07-31T12:04:48+00:00","author":"\u82bd\u4f9d, \u96e8\u591c","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u82bd\u4f9d, \u96e8\u591c","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"32\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","name":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-05-10T04:56:55+00:00","dateModified":"2025-07-31T12:04:48+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/aeb60a7861f2f002b54c66bd65bc6c27"},"description":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL\u3067\u95a2\u6570\u3092\u4f7f\u7528\u306e\u65b9\u6cd5"}]},{"@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\/aeb60a7861f2f002b54c66bd65bc6c27","name":"\u82bd\u4f9d, \u96e8\u591c","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6305fe5cabc2b854c1208975a47fbf3f8cef3f7cd775b94dceedbe59b74a8010?s=96&d=mm&r=g","caption":"\u82bd\u4f9d, \u96e8\u591c"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/meiamaya\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/sql%e3%81%a7%e9%96%a2%e6%95%b0%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/139","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\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":325711,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/139\/revisions\/325711"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}