{"id":5930,"date":"2025-09-23T16:29:02","date_gmt":"2025-09-23T07:29:02","guid":{"rendered":"https:\/\/sky-peace.net\/?p=5930"},"modified":"2025-09-23T16:29:02","modified_gmt":"2025-09-23T07:29:02","slug":"db-sp-3","status":"publish","type":"post","link":"https:\/\/sky-peace.net\/certified\/db-sp-3\/","title":{"rendered":"SQL\u306e\u8868\u73fe\u529b\u3092\u3082\u3046\u4e00\u6bb5\u968e\u9ad8\u3081\u308b\uff01DBA\u8a66\u9a13\u3067\u5dee\u304c\u3064\u304f\u4fbf\u5229\u95a2\u6570\u30fb\u30ab\u30fc\u30bd\u30eb\u30fb\u5236\u7d04\u5b9a\u7fa9"},"content":{"rendered":"<p>\u3053\u308c\u307e\u3067\u306e\u7b2c1\u56de\u300eWindow\u95a2\u6570\u300f\u3001\u7b2c2\u56de\u300eJOIN\u30fb\u30b5\u30d6\u30af\u30a8\u30ea\u300f\u7de8\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u8a66\u9a13\u306eSQL\u554f\u984c\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u571f\u53f0\u306f\u56fa\u307e\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u6700\u7d42\u56de\u3068\u306a\u308b\u4eca\u56de\u306f\u3001SQL\u306e\u5fdc\u7528\u529b\u3068\u8a18\u8ff0\u306e\u8cea\u3092\u3082\u3046\u4e00\u6bb5\u968e\u5f15\u304d\u4e0a\u3052\u308b\u305f\u3081\u306e\u3001\u73e0\u7389\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u96c6\u3081\u305f\u5fdc\u7528\u7de8\u3067\u3059\u3002<\/p>\n<p><code>SELECT<\/code>\u53e5\u306b\u30ed\u30b8\u30c3\u30af\u3092\u57cb\u3081\u8fbc\u3080<code>CASE<\/code>\u5f0f\u3001<code>NULL<\/code>\u3092\u81ea\u5728\u306b\u6271\u3046<code>COALESCE<\/code>\u95a2\u6570\u3001\u884c\u5358\u4f4d\u306e\u304d\u3081\u7d30\u3084\u304b\u306a\u51e6\u7406\u3092\u5b9f\u73fe\u3059\u308b\u30ab\u30fc\u30bd\u30eb\u5236\u5fa1\u3001\u305d\u3057\u3066\u30c7\u30fc\u30bf\u306e\u54c1\u8cea\u3092\u4fdd\u8a3c\u3059\u308b\u5236\u7d04\u5b9a\u7fa9\u307e\u3067\u3002\u4e00\u3064\u4e00\u3064\u306f\u72ec\u7acb\u3057\u305f\u77e5\u8b58\u3067\u3059\u304c\u3001\u77e5\u3063\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3067\u89e3\u7b54\u306e\u8cea\u3068\u901f\u5ea6\u304c\u5927\u304d\u304f\u5909\u308f\u308b\u3082\u306e\u3070\u304b\u308a\u3067\u3059\u3002<\/p>\n<p>\u672c\u8a18\u4e8b\u3067\u7d39\u4ecb\u3059\u308b\u30c6\u30af\u30cb\u30c3\u30af\u3092\u6b66\u5668\u306b\u52a0\u3048\u3001SQL\u30de\u30b9\u30bf\u30fc\u3078\u306e\u6700\u5f8c\u306e\u30d4\u30fc\u30b9\u3092\u57cb\u3081\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2><code>CASE<\/code>\u5f0f\u3068<code>COALESCE<\/code>\u95a2\u6570\u2502SQL\u5185\u3067\u6761\u4ef6\u5206\u5c90\u3068NULL\u51e6\u7406\u3092\u5b9f\u88c5<\/h2>\n<p>SQL\u3067\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u305d\u306e\u5024\u306b\u5fdc\u3058\u3066\u300c\u3082\u3057A\u306a\u3089\u3070X\u3001\u3082\u3057B\u306a\u3089\u3070Y\u300d\u3068\u3044\u3063\u305f\u52d5\u7684\u306a\u51e6\u7406\u3092\u52a0\u3048\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<code>CASE<\/code>\u5f0f\u306f\u3001<code>SELECT<\/code>\u6587\u306a\u3069\u306eSQL\u53e5\u306e\u4e2d\u306b\u3001\u305d\u306e\u3088\u3046\u306a\u6761\u4ef6\u5206\u5c90\u30ed\u30b8\u30c3\u30af\u3092\u57cb\u3081\u8fbc\u3080\u305f\u3081\u306e\u5f37\u529b\u306a\u69cb\u6587\u3067\u3059\u3002<\/p>\n<h3><code>CASE<\/code>\u5f0f\uff1aSQL\u306eIF\u6587<\/h3>\n<p><code>CASE<\/code>\u5f0f\u306b\u306f2\u3064\u306e\u66f8\u304d\u65b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong>\u5358\u7d14CASE\u5f0f<\/strong>: \u7279\u5b9a\u306e\u5217\u306e\u5024\u304c\u4f55\u304b\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u5206\u3051\u308b\uff08<code>switch<\/code>\u6587\u306b\u8fd1\u3044\uff09<\/li>\n<li><strong>\u691c\u7d22CASE\u5f0f<\/strong>: \u8907\u6570\u306e\u6761\u4ef6\u5f0f\u306b\u3088\u3063\u3066\u51e6\u7406\u3092\u5206\u3051\u308b\uff08<code>if-elseif-else<\/code>\u6587\u306b\u8fd1\u3044\uff09<\/li>\n<\/ol>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u691c\u7d22CASE\u5f0f\u3067\u7d66\u4e0e\u30ec\u30d9\u30eb\u3092\u5224\u5b9a\u3059\u308b<\/h4>\n<p>\u5f93\u696d\u54e1\u306e\u7d66\u4e0e\uff08<code>salary<\/code>\uff09\u306b\u5fdc\u3058\u3066\u3001\u300c\u9ad8\u300d\u300c\u4e2d\u300d\u300c\u4f4e\u300d\u306e\u30e9\u30f3\u30af\u4ed8\u3051\u3092\u884c\u3046\u4f8b\u3067\u3059\u3002<\/p>\n<pre><code>SELECT\n  employee_name,\n  salary,\n  CASE\n    WHEN salary >= 700 THEN '\u9ad8'\n    WHEN salary >= 500 THEN '\u4e2d'\n    ELSE '\u4f4e'\n  END AS salary_rank\nFROM\n  employees;\n<\/code><\/pre>\n<p><code>WHEN<\/code>\u53e5\u306f\u4e0a\u306b\u66f8\u304b\u308c\u305f\u3082\u306e\u304b\u3089\u9806\u306b\u8a55\u4fa1\u3055\u308c\u308b\u305f\u3081\u3001\u6761\u4ef6\u306e\u9806\u5e8f\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n<h3>\u3010\u983b\u51fa\u3011<code>GROUP BY<\/code>\u3068\u7d44\u307f\u5408\u308f\u305b\u305f\u6761\u4ef6\u4ed8\u304d\u96c6\u8a08<\/h3>\n<p><code>CASE<\/code>\u5f0f\u304c\u771f\u4fa1\u3092\u767a\u63ee\u3059\u308b\u306e\u304c\u3001\u96c6\u8a08\u95a2\u6570\u3068\u7d44\u307f\u5408\u308f\u305b\u305f<strong>\u6761\u4ef6\u4ed8\u304d\u96c6\u8a08<\/strong>\u3067\u3059\u3002\u3053\u308c\u306f\u3001\u884c\u3092\u7e26\u306b\u96c6\u7d04\u3057\u3064\u3064\u3001<code>CASE<\/code>\u5f0f\u3067\u6a2a\u65b9\u5411\u306e\u96c6\u8a08\u3092\u884c\u3046\u30a4\u30e1\u30fc\u30b8\u3067\u3001<strong>\u30c7\u30fc\u30bf\u306e\u30d4\u30dc\u30c3\u30c8\uff08\u884c\u5217\u5909\u63db\uff09<\/strong>\u3092\u5b9f\u73fe\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u90e8\u7f72\u3054\u3068\u306b\u6027\u5225\u306e\u4eba\u54e1\u6570\u3092\u96c6\u8a08\u3059\u308b<\/h4>\n<pre><code>SELECT\n  dept_name,\n  -- \u6027\u5225\u304c\u7537\u6027\u306e\u884c\u3060\u3051\u3092\u30ab\u30a6\u30f3\u30c8\n  COUNT(CASE WHEN gender = '\u7537\u6027' THEN 1 END) AS male_count,\n  -- \u6027\u5225\u304c\u5973\u6027\u306e\u884c\u3060\u3051\u3092\u30ab\u30a6\u30f3\u30c8\n  COUNT(CASE WHEN gender = '\u5973\u6027' THEN 1 END) AS female_count\nFROM\n  employees\nGROUP BY\n  dept_name;\n<\/code><\/pre>\n<p>\u3053\u306e\u30af\u30a8\u30ea\u306f\u3001\u5404\u90e8\u7f72\u306b\u3064\u3044\u3066\u300c\u7537\u6027\u306e\u4eba\u6570\u300d\u3068\u300c\u5973\u6027\u306e\u4eba\u6570\u300d\u30921\u884c\u3067\u8868\u793a\u3059\u308b\u7d50\u679c\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<h3><code>COALESCE<\/code>\u95a2\u6570\uff1aNULL\u3092\u30b9\u30de\u30fc\u30c8\u306b\u6271\u3046<\/h3>\n<p><code>NULL<\/code>\u5024\u306f\u300c\u5024\u304c\u5b58\u5728\u3057\u306a\u3044\u300d\u3053\u3068\u3092\u793a\u3059\u7279\u6b8a\u306a\u72b6\u614b\u3067\u3042\u308a\u3001\u8a08\u7b97\u3084\u6bd4\u8f03\u3067\u610f\u56f3\u3057\u306a\u3044\u7d50\u679c\u3092\u62db\u304f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<code>COALESCE<\/code>\uff08\u30b3\u30a2\u30ec\u30b9\uff09\u95a2\u6570\u306f\u3001<code>NULL<\/code>\u3092\u5225\u306e\u610f\u5473\u306e\u3042\u308b\u5024\u306b\u7f6e\u304d\u63db\u3048\u308b\u305f\u3081\u306e\u30b7\u30f3\u30d7\u30eb\u306a\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p><code>COALESCE<\/code>\u306f\u5f15\u6570\u3092\u8907\u6570\u53d7\u3051\u53d6\u308a\u3001\u305d\u306e\u4e2d\u3067<strong>\u6700\u521d\u306b\u898b\u3064\u304b\u3063\u305f<code>NULL<\/code>\u3067\u306a\u3044\u5024<\/strong>\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u8868\u793a\u540d\u3092\u30cb\u30c3\u30af\u30cd\u30fc\u30e0\u3001\u306a\u3051\u308c\u3070\u672c\u540d\u3001\u305d\u308c\u3082\u306a\u3051\u308c\u3070\u300c\u533f\u540d\u300d\u306b<\/h4>\n<pre><code>SELECT\n  COALESCE(nickname, real_name, '\u533f\u540d') AS display_name\nFROM\n  users;\n<\/code><\/pre>\n<p>\u3053\u306e\u30af\u30a8\u30ea\u306f\u3001<code>nickname<\/code>\u5217\u304c<code>NULL<\/code>\u3067\u306a\u3051\u308c\u3070\u305d\u306e\u5024\u3092\u3001<code>NULL<\/code>\u3067\u3042\u308c\u3070\u6b21\u306b<code>real_name<\/code>\u5217\u306e\u5024\u3092\u3001\u305d\u308c\u3082<code>NULL<\/code>\u3067\u3042\u308c\u3070\u6700\u5f8c\u306b `&#8217;\u533f\u540d&#8217;` \u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p><code>COALESCE<\/code>\u306f\u3001<code>CASE WHEN nickname IS NOT NULL THEN nickname ELSE ... END<\/code>\u3068\u3044\u3046\u5197\u9577\u306a\u8a18\u8ff0\u3092\u7c21\u6f54\u306b\u3057\u3066\u304f\u308c\u308b\u3001\u975e\u5e38\u306b\u4fbf\u5229\u306a\u95a2\u6570\u3067\u3059\u3002<\/p>\n<h2>\u30ab\u30fc\u30bd\u30eb\u5236\u5fa1\u306e\u57fa\u672c\u2502\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u9023\u643a\u3068\u884c\u5358\u4f4d\u64cd\u4f5c<\/h2>\n<p>\u3053\u308c\u307e\u3067\u89e3\u8aac\u3057\u3066\u304d\u305fSQL\u306f\u3001\u6761\u4ef6\u306b\u5408\u81f4\u3059\u308b<strong>\u30c7\u30fc\u30bf\u306e\u96c6\u5408<\/strong>\u3092\u4e00\u62ec\u3067\u64cd\u4f5c\u3059\u308b\u300c\u96c6\u5408\u6307\u5411\u300d\u306e\u8003\u3048\u65b9\u306b\u57fa\u3065\u3044\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u696d\u52d9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8981\u4ef6\u306b\u3088\u3063\u3066\u306f\u3001\u53d6\u5f97\u3057\u305f\u7d50\u679c\u30921\u884c\u305a\u3064\u9806\u756a\u306b\u51e6\u7406\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u300c<strong>\u884c\u5358\u4f4d<\/strong>\u300d\u306e\u64cd\u4f5c\u3092\u5b9f\u73fe\u3059\u308b\u306e\u304c<strong>\u30ab\u30fc\u30bd\u30eb<\/strong>\u3067\u3059\u3002<\/p>\n<h3>\u306a\u305c\u30ab\u30fc\u30bd\u30eb\u304c\u5fc5\u8981\u306b\u306a\u308b\u306e\u304b\uff1f<\/h3>\n<p>\u30ab\u30fc\u30bd\u30eb\u306f\u4e3b\u306b\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\uff08\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3084\u3001Java\/COBOL\u306a\u3069\u306e\u8a00\u8a9e\u306b\u7d44\u307f\u8fbc\u307e\u308c\u305fSQL\uff09\u3067\u5229\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001\u300c\u5f93\u696d\u54e1\u30ec\u30b3\u30fc\u30c9\u30921\u4ef6\u305a\u3064\u8aad\u307f\u8fbc\u307f\u3001\u305d\u306e\u5185\u5bb9\u306b\u5fdc\u3058\u3066\u5916\u90e8\u306eAPI\u3092\u547c\u3073\u51fa\u3057\u305f\u308a\u3001\u8907\u96d1\u306a\u8a08\u7b97\u3092\u884c\u3063\u3066\u5225\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u66f4\u65b0\u3057\u305f\u308a\u3059\u308b\u300d\u3068\u3044\u3063\u305f\u51e6\u7406\u306f\u3001\u4e00\u62ec\u306eSQL\u6587\u3067\u8a18\u8ff0\u3059\u308b\u306e\u304c\u56f0\u96e3\u3067\u3059\u3002\u30ab\u30fc\u30bd\u30eb\u306f\u3001\u3053\u306e\u3088\u3046\u306a\u624b\u7d9a\u304d\u7684\u306a\u51e6\u7406\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002<\/p>\n<h3>\u30ab\u30fc\u30bd\u30eb\u306e\u57fa\u672c\u30d5\u30ed\u30fc<\/h3>\n<p>\u30ab\u30fc\u30bd\u30eb\u306e\u64cd\u4f5c\u306f\u3001\u672c\u3092\u8aad\u3080\u6d41\u308c\u306b\u4f3c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li><strong><code>DECLARE<\/code> (\u5ba3\u8a00)<\/strong>: \u8aad\u307f\u305f\u3044\u672c\uff08<code>SELECT<\/code>\u6587\uff09\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u307e\u3060\u672c\u306f\u958b\u3044\u3066\u3044\u307e\u305b\u3093\u3002<\/li>\n<li><strong><code>OPEN<\/code> (\u30aa\u30fc\u30d7\u30f3)<\/strong>: \u672c\u3092\u958b\u304d\u3001\u8aad\u307f\u59cb\u3081\u308b\u6e96\u5099\u3092\u3057\u307e\u3059\u3002\u3053\u306e\u6642\u70b9\u3067<code>SELECT<\/code>\u6587\u304c\u5b9f\u884c\u3055\u308c\u3001\u7d50\u679c\u30bb\u30c3\u30c8\u304c\u5185\u90e8\u7684\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/li>\n<li><strong><code>FETCH<\/code> (\u30c7\u30fc\u30bf\u53d6\u5f97)<\/strong>: \u73fe\u5728\u306e\u30da\u30fc\u30b8\uff08\u884c\uff09\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u53d6\u308a\u3001\u5909\u6570\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u6b21\u306e\u30da\u30fc\u30b8\uff08\u884c\uff09\u3078\u3068\u9032\u307f\u307e\u3059\u3002\u3053\u306e<code>FETCH<\/code>\u64cd\u4f5c\u3092\u30eb\u30fc\u30d7\u3067\u7e70\u308a\u8fd4\u3057\u307e\u3059\u3002<\/li>\n<li><strong><code>CLOSE<\/code> (\u30af\u30ed\u30fc\u30ba)<\/strong>: \u672c\u3092\u8aad\u307f\u7d42\u3048\u305f\u3089\u9589\u3058\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u78ba\u4fdd\u3057\u3066\u3044\u305f\u30ea\u30bd\u30fc\u30b9\u304c\u89e3\u653e\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ol>\n<h4>\u3010\u51e6\u7406\u30a4\u30e1\u30fc\u30b8\u3011<\/h4>\n<pre><code>-- 1. DECLARE: emp_cursor\u3068\u3044\u3046\u540d\u524d\u306e\u30ab\u30fc\u30bd\u30eb\u3092\u5ba3\u8a00\nDECLARE emp_cursor CURSOR FOR\n  SELECT employee_id, salary FROM employees;\n\n-- 2. OPEN: \u30ab\u30fc\u30bd\u30eb\u3092\u958b\u304f\nOPEN emp_cursor;\n\n-- 3. FETCH: \u6700\u521d\u306e\u884c\u3092\u53d6\u5f97\u3057\u3001\u5909\u6570\u306b\u683c\u7d0d\nFETCH NEXT FROM emp_cursor INTO @id, @sal;\n\n-- \u30eb\u30fc\u30d7\u3067\u5168\u884c\u3092\u51e6\u7406\nWHILE (\u6761\u4ef6\u5f0f) -- \u30c7\u30fc\u30bf\u304c\u7d9a\u304f\u9650\u308a\nBEGIN\n  -- \u3053\u3053\u3067\u5909\u6570@id, @sal\u3092\u4f7f\u3063\u305f\u884c\u5358\u4f4d\u306e\u51e6\u7406\u3092\u5b9f\u884c\n  \n  -- \u6b21\u306e\u884c\u3092\u53d6\u5f97\n  FETCH NEXT FROM emp_cursor INTO @id, @sal;\nEND;\n\n-- 4. CLOSE: \u30ab\u30fc\u30bd\u30eb\u3092\u9589\u3058\u308b\nCLOSE emp_cursor;\nDEALLOCATE emp_cursor; -- \u30ab\u30fc\u30bd\u30eb\u306e\u5b9a\u7fa9\u3092\u89e3\u653e\n<\/code><\/pre>\n<h3><code>WHERE CURRENT OF<\/code>: \u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u306e\u884c\u3092\u64cd\u4f5c<\/h3>\n<p>\u30ab\u30fc\u30bd\u30eb\u3067<code>FETCH<\/code>\u3057\u305f\u884c\u306b\u5bfe\u3057\u3066\u3001\u66f4\u65b0\uff08<code>UPDATE<\/code>\uff09\u3084\u524a\u9664\uff08<code>DELETE<\/code>\uff09\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u3001<code>WHERE CURRENT OF \u30ab\u30fc\u30bd\u30eb\u540d<\/code>\u3068\u3044\u3046\u7279\u5225\u306a\u53e5\u304c\u4f7f\u3048\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u300c\u4eca\u8aad\u307f\u53d6\u3063\u305f\u3001\u307e\u3055\u306b\u305d\u306e\u884c\u300d\u3092\u5b89\u5168\u304b\u3064\u52b9\u7387\u7684\u306b\u64cd\u4f5c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u8a66\u9a13\u3067\u306f\u3001\u30ab\u30fc\u30bd\u30eb\u306f\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u4e0a\u306e\u7406\u7531\u304b\u3089\u591a\u7528\u3059\u3079\u304d\u3067\u306f\u306a\u3044\u3068\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u306e\u9023\u643a\u3092\u60f3\u5b9a\u3057\u305f\u554f\u984c\u3067\u305d\u306e\u6982\u5ff5\u3084\u4e00\u9023\u306e\u6d41\u308c\u304c\u554f\u308f\u308c\u308b\u305f\u3081\u3001\u5fc5\u305a\u62bc\u3055\u3048\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u3092\u5b88\u308b\u5236\u7d04\u5b9a\u7fa9\u2502UNIQUE\u3068CHECK<\/h2>\n<p>\u3053\u308c\u307e\u3067\u89e3\u8aac\u3057\u3066\u304d\u305fSQL\u306e\u591a\u304f\u306f\u3001\u30c7\u30fc\u30bf\u305d\u306e\u3082\u306e\u3092\u64cd\u4f5c\u3059\u308b<strong>DML<\/strong>\uff08Data Manipulation Language\uff09\u3067\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4fe1\u983c\u6027\u3092\u62c5\u4fdd\u3059\u308b\u306b\u306f\u3001\u305d\u3082\u305d\u3082\u4e0d\u6b63\u306a\u30c7\u30fc\u30bf\u304c\u767b\u9332\u3055\u308c\u306a\u3044\u3088\u3046\u306b\u30c6\u30fc\u30d6\u30eb\u306e\u69cb\u9020\u81ea\u4f53\u306b\u30eb\u30fc\u30eb\u3092\u8a2d\u3051\u308b<strong>DDL<\/strong>\uff08Data Definition Language\uff09\u304c\u4e0d\u53ef\u6b20\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u30eb\u30fc\u30eb\u3092\u5b9a\u7fa9\u3059\u308b\u306e\u304c<strong>\u5236\u7d04\uff08Constraint\uff09<\/strong>\u3067\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u3067\u306e\u30c1\u30a7\u30c3\u30af\u3060\u3051\u3067\u306a\u304f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u81ea\u8eab\u304c\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027\u3092\u5b88\u308b\u6700\u5f8c\u306e\u7826\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3><code>UNIQUE<\/code>\u5236\u7d04\uff1a\u4e00\u610f\u6027\u3092\u4fdd\u8a3c\u3059\u308b<\/h3>\n<p><code>UNIQUE<\/code>\u5236\u7d04\u306f\u3001\u6307\u5b9a\u3055\u308c\u305f\u5217\uff08\u307e\u305f\u306f\u5217\u306e\u7d44\u307f\u5408\u308f\u305b\uff09\u306b<strong>\u91cd\u8907\u3059\u308b\u5024\u304c\u5165\u308b\u3053\u3068\u3092\u7981\u6b62<\/strong>\u3057\u307e\u3059\u3002\u4e3b\u30ad\u30fc\uff08<code>PRIMARY KEY<\/code>\uff09\u3082\u4e00\u610f\u6027\u3092\u4fdd\u8a3c\u3057\u307e\u3059\u304c\u3001<code>UNIQUE<\/code>\u5236\u7d04\u306f\u4e3b\u30ad\u30fc\u4ee5\u5916\u3067\u4e00\u610f\u306b\u3057\u305f\u3044\u5217\u306b\u5bfe\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>1\u3064\u306e\u30c6\u30fc\u30d6\u30eb\u306b\u8907\u6570\u8a2d\u5b9a\u3067\u304d\u308b\u3002<\/li>\n<li><code>NULL<\/code>\u306e\u6271\u3044\u304c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u88fd\u54c1\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u5834\u5408\u304c\u3042\u308b\uff08\u4e00\u822c\u7684\u306b<code>NULL<\/code>\u306f1\u3064\u3060\u3051\u8a31\u53ef\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u3044\uff09\u3002<\/li>\n<\/ul>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u5f93\u696d\u54e1\u30c6\u30fc\u30d6\u30eb\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u91cd\u8907\u3055\u305b\u306a\u3044<\/h4>\n<p>\u5f93\u696d\u54e1\u756a\u53f7\uff08<code>employee_id<\/code>\uff09\u304c\u4e3b\u30ad\u30fc\u3060\u3068\u3057\u3066\u3082\u3001\u9023\u7d61\u5148\u3068\u306a\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3082\u793e\u5185\u3067\u4e00\u610f\u3067\u3042\u308b\u3079\u304d\u3067\u3059\u3002<\/p>\n<pre><code>CREATE TABLE employees (\n  employee_id INT PRIMARY KEY,\n  employee_name VARCHAR(100),\n  email VARCHAR(255) UNIQUE -- email\u5217\u306bUNIQUE\u5236\u7d04\u3092\u8a2d\u5b9a\n);\n<\/code><\/pre>\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001\u3059\u3067\u306b\u5b58\u5728\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u767b\u9332\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u30a8\u30e9\u30fc\u3092\u8fd4\u3057\u3066\u767b\u9332\u3092\u9632\u304e\u307e\u3059\u3002<\/p>\n<h3><code>CHECK<\/code>\u5236\u7d04\uff1a\u696d\u52d9\u30eb\u30fc\u30eb\u3092\u5f37\u5236\u3059\u308b<\/h3>\n<p><code>CHECK<\/code>\u5236\u7d04\u306f\u3001\u5217\u306b\u633f\u5165\u307e\u305f\u306f\u66f4\u65b0\u3055\u308c\u308b\u5024\u304c<strong>\u6307\u5b9a\u3057\u305f\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u304b<\/strong>\u3092\u691c\u8a3c\u3057\u307e\u3059\u3002\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d0\u30b0\u306a\u3069\u306b\u3088\u3063\u3066\u4e0d\u6b63\u306a\u30c7\u30fc\u30bf\u304c\u767b\u9332\u3055\u308c\u308b\u306e\u3092\u9632\u3050\u3001\u975e\u5e38\u306b\u5f37\u529b\u306a\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u7d66\u4e0e\u306f\u5fc5\u305a0\u3088\u308a\u5927\u304d\u3044\u3001\u8ca9\u58f2\u7d42\u4e86\u65e5\u306f\u958b\u59cb\u65e5\u4ee5\u964d<\/h4>\n<pre><code>CREATE TABLE products (\n  product_id INT PRIMARY KEY,\n  price INT CHECK (price > 0), -- \u4fa1\u683c\u306f\u5fc5\u305a\u6b63\u306e\u5024\n  -- \u8ca9\u58f2\u7d42\u4e86\u65e5\u306f\u3001\u8ca9\u58f2\u958b\u59cb\u65e5\u4ee5\u964d\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\n  start_date DATE,\n  end_date DATE,\n  CONSTRAINT date_check CHECK (end_date >= start_date)\n);\n<\/code><\/pre>\n<ul>\n<li><code>CHECK (price > 0)<\/code> \u306e\u3088\u3046\u306b\u3001\u305d\u306e\u5217\u81ea\u8eab\u306b\u5bfe\u3059\u308b\u30b7\u30f3\u30d7\u30eb\u306a\u6761\u4ef6\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><code>CONSTRAINT date_check CHECK (end_date >= start_date)<\/code> \u306e\u3088\u3046\u306b\u3001\u8907\u6570\u306e\u5217\u306b\u307e\u305f\u304c\u308b\u8907\u96d1\u306a\u6761\u4ef6\u3092\u8a2d\u5b9a\u3057\u3001\u5236\u7d04\u306b\u540d\u524d\u3092\u4ed8\u3051\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u5236\u7d04\u3092\u9069\u5207\u306b\u8a2d\u8a08\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u306e\u54c1\u8cea\u3068\u6574\u5408\u6027\u304c\u683c\u6bb5\u306b\u5411\u4e0a\u3057\u3001\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u306e\u4fe1\u983c\u6027\u306b\u7e4b\u304c\u308a\u307e\u3059\u3002<\/p>\n<h2>\u77e5\u3063\u3066\u3044\u308b\u3068\u4fbf\u5229\u306a\u6f14\u7b97\u5b50\u3068\u95a2\u6570\u2502CAST\u3068BETWEEN<\/h2>\n<p>\u6700\u5f8c\u306b\u3001\u7279\u5b9a\u306e\u72b6\u6cc1\u3067SQL\u306e\u8a18\u8ff0\u3092\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u304b\u3064\u6b63\u78ba\u306b\u3057\u3066\u304f\u308c\u308b\u3001\u4fbf\u5229\u306a\u95a2\u6570\u3068\u6f14\u7b97\u5b50\u30922\u3064\u7d39\u4ecb\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u983b\u7e41\u306b\u4f7f\u3046\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u3044\u3056\u3068\u3044\u3046\u6642\u306b\u5f79\u7acb\u3064\u77e5\u8b58\u3067\u3059\u3002<\/p>\n<h3><code>CAST<\/code>\u95a2\u6570\uff1a\u660e\u793a\u7684\u306a\u30c7\u30fc\u30bf\u578b\u5909\u63db<\/h3>\n<p><code>CAST<\/code>\u95a2\u6570\u306f\u3001\u3042\u308b\u30c7\u30fc\u30bf\u578b\u306e\u5024\u3092\u3001\u6307\u5b9a\u3057\u305f\u5225\u306e\u30c7\u30fc\u30bf\u578b\u306b<strong>\u660e\u793a\u7684\u306b\u5909\u63db<\/strong>\u3057\u307e\u3059\u3002<\/p>\n<p>\u4f8b\u3048\u3070\u3001<code>VARCHAR<\/code>\u578b\uff08\u6587\u5b57\u5217\uff09\u3067\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u6570\u5024\u3092\u8a08\u7b97\u306b\u4f7f\u3044\u305f\u3044\u5834\u5408\u3084\u3001<code>TIMESTAMP<\/code>\u578b\uff08\u65e5\u6642\uff09\u304b\u3089\u65e5\u4ed8\u90e8\u5206\u3060\u3051\u3092\u53d6\u308a\u51fa\u3057\u305f\u3044\u5834\u5408\u306a\u3069\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u6587\u5b57\u5217\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u305f\u65e5\u4ed8\u3092\u3001\u65e5\u4ed8\u578b\u3068\u3057\u3066\u6271\u3046<\/h4>\n<p><code>sales_date<\/code>\u5217\u304c<code>'20250923'<\/code>\u306e\u3088\u3046\u306a<code>VARCHAR(8)<\/code>\u3067\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u307e\u307e\u3067\u306f\u65e5\u4ed8\u3068\u3057\u3066\u306e\u6bd4\u8f03\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<pre><code>SELECT\n  order_id,\n  sales_amount\nFROM\n  sales_log\nWHERE\n  CAST(sales_date AS DATE) > '2025-09-01';\n<\/code><\/pre>\n<p><code>CAST(sales_date AS DATE)<\/code>\u306b\u3088\u3063\u3066\u3001\u6587\u5b57\u5217\u304c\u65e5\u4ed8\u578b\u306b\u5909\u63db\u3055\u308c\u3001\u65e5\u4ed8\u3068\u3057\u3066\u306e\u6bd4\u8f03\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u540c\u69d8\u306b\u3001<code>CAST(column AS INTEGER)<\/code>\u3067\u6570\u5024\u578b\u306b\u5909\u63db\u3057\u3066\u8a08\u7b97\u3092\u884c\u3046\u3053\u3068\u3082\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n<h3><code>BETWEEN<\/code>\u6f14\u7b97\u5b50\uff1a\u7bc4\u56f2\u6307\u5b9a\u3092\u7c21\u6f54\u306b<\/h3>\n<p><code>BETWEEN<\/code>\u6f14\u7b97\u5b50\u306f\u3001<code>WHERE<\/code>\u53e5\u3067<strong>\u5024\u304c\u7279\u5b9a\u306e\u7bc4\u56f2\u5185\u306b\u3042\u308b\u304b<\/strong>\u3092\u5224\u5b9a\u3059\u308b\u305f\u3081\u306b\u4f7f\u3044\u307e\u3059\u3002<code>>=<\/code>\u3068<code><=<\/code>\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u6761\u4ef6\u5f0f\u3092\u3001\u3088\u308a\u30b7\u30f3\u30d7\u30eb\u306b\u8a18\u8ff0\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>\u3010\u91cd\u8981\u3011<\/h4>\n<p><code>BETWEEN<\/code>\u306f<strong>\u5883\u754c\u5024\u3092\u542b\u3080<\/strong>\uff08<code>value1<\/code>\u4ee5\u4e0a\u3001<code>value2<\/code>\u4ee5\u4e0b\uff09\u3068\u3044\u3046\u70b9\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h4>\u3010\u5177\u4f53\u4f8b\u3011\u7279\u5b9a\u306e\u671f\u9593\u306b\u767b\u9332\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u3092\u62bd\u51fa\u3059\u308b<\/h4>\n<p><code>entry_date<\/code>\u304c<code>2025-04-01<\/code>\u304b\u3089<code>2025-04-30<\/code>\u307e\u3067\u306e\u30e6\u30fc\u30b6\u30fc\u3092\u62bd\u51fa\u3057\u305f\u3044\u5834\u5408\u3002<\/p>\n<p><strong><code>BETWEEN<\/code>\u3092\u4f7f\u308f\u306a\u3044\u5834\u5408<\/strong><\/p>\n<pre><code>SELECT user_name, entry_date FROM users\nWHERE entry_date >= '2025-04-01' AND entry_date <= '2025-04-30';\n<\/code><\/pre>\n<p><strong><code>BETWEEN<\/code>\u3092\u4f7f\u3063\u305f\u5834\u5408<\/strong><\/p>\n<pre><code>SELECT user_name, entry_date FROM users\nWHERE entry_date BETWEEN '2025-04-01' AND '2025-04-30';\n<\/code><\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<code>BETWEEN<\/code>\u3092\u4f7f\u3046\u3053\u3068\u3067\u7bc4\u56f2\u6307\u5b9a\u306e\u610f\u56f3\u304c\u660e\u78ba\u306b\u306a\u308a\u3001\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002\u6570\u5024\u3084\u65e5\u4ed8\u306e\u7bc4\u56f2\u3092\u6307\u5b9a\u3059\u308b\u969b\u306b\u306f\u7a4d\u6975\u7684\u306b\u6d3b\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u307e\u3068\u3081\uff1aSQL\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7fd2\u5f97\u3057\u3001\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b<\/h2>\n<p>\u6700\u7d42\u56de\u3068\u306a\u308b\u4eca\u56de\u306f\u3001SQL\u306e\u5fdc\u7528\u529b\u3068\u8a18\u8ff0\u306e\u8cea\u3092\u9ad8\u3081\u308b\u3001\u5b9f\u8df5\u7684\u306a\u30c6\u30af\u30cb\u30c3\u30af\u3092\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u500b\u3005\u306e\u6a5f\u80fd\u306f\u72ec\u7acb\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3044\u305a\u308c\u3082\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u306a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u958b\u767a\u306b\u304a\u3044\u3066\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong><code>CASE<\/code>\u5f0f\u3068<code>COALESCE<\/code>\u95a2\u6570<\/strong>: <code>SELECT<\/code>\u53e5\u306b<strong>\u6761\u4ef6\u5206\u5c90<\/strong>\u3084<strong>NULL\u51e6\u7406<\/strong>\u306e\u30ed\u30b8\u30c3\u30af\u3092\u7d44\u307f\u8fbc\u307f\u3001SQL\u306e\u8868\u73fe\u529b\u3092\u98db\u8e8d\u7684\u306b\u9ad8\u3081\u307e\u3059\u3002\u7279\u306b\u6761\u4ef6\u4ed8\u304d\u96c6\u8a08\u306f\u5f37\u529b\u3067\u3059\u3002<\/li>\n<li><strong>\u30ab\u30fc\u30bd\u30eb<\/strong>: <strong>\u884c\u5358\u4f4d\u306e\u9010\u6b21\u51e6\u7406<\/strong>\u3092\u53ef\u80fd\u306b\u3057\u3001SQL\u306e\u96c6\u5408\u6307\u5411\u51e6\u7406\u3060\u3051\u3067\u306f\u5bfe\u5fdc\u3067\u304d\u306a\u3044\u3001\u8907\u96d1\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30ed\u30b8\u30c3\u30af\u3092\u5b9f\u73fe\u3057\u307e\u3059\u3002<\/li>\n<li><strong>\u5236\u7d04 (<code>UNIQUE<\/code>, <code>CHECK<\/code>)<\/strong>: \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u81ea\u8eab\u306b<strong>\u30c7\u30fc\u30bf\u306e\u6574\u5408\u6027<\/strong>\u3092\u4fdd\u8a3c\u3055\u305b\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u4e0d\u5177\u5408\u304b\u3089\u30c7\u30fc\u30bf\u3092\u5b88\u308a\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u4fe1\u983c\u6027\u3092\u6839\u672c\u304b\u3089\u652f\u3048\u307e\u3059\u3002<\/li>\n<li><strong>\u4fbf\u5229\u95a2\u6570\u30fb\u6f14\u7b97\u5b50<\/strong>: <code>CAST<\/code>\u306b\u3088\u308b\u578b\u5909\u63db\u3084<code>BETWEEN<\/code>\u306b\u3088\u308b\u7bc4\u56f2\u6307\u5b9a\u306f\u3001\u30b3\u30fc\u30c9\u306e<strong>\u53ef\u8aad\u6027\u3092\u9ad8\u3081\u3001\u610f\u56f3\u3092\u660e\u78ba\u306b\u3059\u308b<\/strong>\u4e0a\u3067\u5f79\u7acb\u3061\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u306f\u3001\u5358\u306a\u308bSQL\u306e\u77e5\u8b58\u306b\u7559\u307e\u308a\u307e\u305b\u3093\u3002\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u3068\u3057\u3066\u3001\u3044\u304b\u306b\u3057\u3066<strong>\u5805\u7262\u3067\u3001\u4fdd\u5b88\u6027\u304c\u9ad8\u304f\u3001\u4fe1\u983c\u3067\u304d\u308b\u30b7\u30b9\u30c6\u30e0\u3092\u69cb\u7bc9\u3059\u308b\u304b<\/strong>\u3068\u3044\u3046\u8a2d\u8a08\u601d\u60f3\u305d\u306e\u3082\u306e\u306b\u7e4b\u304c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u51683\u56de\u306b\u308f\u305f\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u8a66\u9a13\u3067\u554f\u308f\u308c\u308b\u9ad8\u5ea6\u306aSQL\u30c6\u30af\u30cb\u30c3\u30af\u3092\u89e3\u8aac\u3057\u3066\u304d\u307e\u3057\u305f\u3002Window\u95a2\u6570\u306b\u3088\u308b\u5206\u6790\u3001JOIN\u3084\u30b5\u30d6\u30af\u30a8\u30ea\u306b\u3088\u308b\u7d50\u5408\u3001\u305d\u3057\u3066\u4eca\u56de\u306e\u5fdc\u7528\u6280\u8853\u3002\u3053\u308c\u3089\u3092\u30de\u30b9\u30bf\u30fc\u3057\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u3042\u306a\u305f\u306f\u3069\u3093\u306a\u8907\u96d1\u306a\u8981\u4ef6\u306b\u3082\u5bfe\u5fdc\u3067\u304d\u308bSQL\u306e\u529b\u3092\u624b\u306b\u5165\u308c\u305f\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u5408\u683c\u306b\u5411\u3051\u3066\u3001\u6700\u5f8c\u306e\u4ed5\u4e0a\u3052\u306b\u52b1\u3093\u3067\u304f\u3060\u3055\u3044\u3002\u5fdc\u63f4\u3057\u3066\u3044\u307e\u3059\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u307e\u3067\u306e\u7b2c1\u56de\u300eWindow\u95a2\u6570\u300f\u3001\u7b2c2\u56de\u300eJOIN\u30fb\u30b5\u30d6\u30af\u30a8\u30ea\u300f\u7de8\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30da\u30b7\u30e3\u30ea\u30b9\u30c8\u8a66\u9a13\u306eSQL\u554f\u984c\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306e\u571f\u53f0\u306f\u56fa\u307e\u308a\u307e\u3057\u305f\u3002 \u6700\u7d42\u56de\u3068\u306a\u308b\u4eca\u56de\u306f\u3001SQL\u306e\u5fdc\u7528\u529b\u3068\u8a18\u8ff0\u306e\u8cea\u3092 &#8230; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","columnck":"","stmeta_robots":"index, follow","st_titlewords":"","st_title_extra":"","st_keywords":"","st_description":"","st_display_ad_mark":"","st_display_ad_mark_hide":"","textcopyck":"","st_copyright":"","st_copyurl":"","eyecatch_set":"","st_youtube_url":"","st_youtube_eyecatch":"","headerwidget_set":"","updatewidget_set":"","kanrenwidget_set":"","ikkatuwidget_set":"","koukoku_set":"","auto_adsense_koukoku_set":"","st_redirect":"","st_redirect_url_as_canonical":"","st_redirect_pvm_do_not_track":"","post_data_updatewidget_set":"","st_post_header_under_bg":"","st_twitter_tag":"","affinger_note":"","rankdisplayck":"","st_head_code":"","st_footer_code":"","st_post_header_under_code":"","_st_toc_override":false,"_st_toc_settings":[]},"categories":[3],"tags":[6],"class_list":["post-5930","post","type-post","status-publish","format-standard","hentry","category-ipa","tag-6"],"_links":{"self":[{"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/posts\/5930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/comments?post=5930"}],"version-history":[{"count":0,"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/posts\/5930\/revisions"}],"wp:attachment":[{"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/media?parent=5930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/categories?post=5930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sky-peace.net\/certified\/wp-json\/wp\/v2\/tags?post=5930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}