{"id":1848,"date":"2026-07-30T23:30:00","date_gmt":"2026-07-30T14:30:00","guid":{"rendered":"https:\/\/blog.nexive.tech\/?p=1848"},"modified":"2026-07-30T18:51:58","modified_gmt":"2026-07-30T09:51:58","slug":"sql-missing-ids-from-list","status":"publish","type":"post","link":"https:\/\/blog.nexive.tech\/?p=1848","title":{"rendered":"\u6307\u5b9a\u3057\u305fID\u306e\u3046\u3061DB\u306b\u5b58\u5728\u3057\u306a\u3044\u3082\u306e\u3092SQL\u3067\u51fa\u3059\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Excel\u3084\u30e1\u30fc\u30eb\u3067ID\u4e00\u89a7\u3092\u6e21\u3055\u308c\u3066\u3001\u300c\u3053\u306e\u9867\u5ba2ID\u3001\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u898b\u3066\u304a\u3044\u3066\u300d\u3068\u8a00\u308f\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b58\u5728\u3059\u308bID\u3060\u3051\u3067\u3088\u3051\u308c\u3070\u3001<code>IN (...)<\/code> \u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002 \u305f\u3060\u3001\u78ba\u8a8d\u4f5c\u696d\u3067\u672c\u5f53\u306b\u6b32\u3057\u3044\u306e\u306f\u3001\u767b\u9332\u3055\u308c\u3066\u3044\u305fID\u3067\u306f\u306a\u304f\u3001<span class=\"swl-marker mark_yellow\">\u6e21\u3055\u308c\u305f\u4e00\u89a7\u306e\u3046\u3061DB\u306b\u5b58\u5728\u3057\u306a\u304b\u3063\u305fID<\/span> \u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>IN<\/code> \u3067\u691c\u7d22\u3059\u308b\u3068\u3001\u5b58\u5728\u3059\u308b\u884c\u3060\u3051\u304c\u8fd4\u308a\u307e\u3059\u3002 \u5b58\u5728\u3057\u306a\u304b\u3063\u305fID\u306f\u3001\u7d50\u679c\u306b\u51fa\u307e\u305b\u3093\u3002 \u753b\u9762\u4e0a\u3067\u306f\u9759\u304b\u306b\u6d88\u3048\u308b\u306e\u3067\u3001\u3042\u3068\u304b\u3089\u300c\u3042\u308c\u30011003\u306f\u898b\u305f\u3093\u3060\u3063\u3051\u300d\u3068\u306a\u308a\u304c\u3061\u3067\u3059\u3002\u307e\u3042\u307e\u3042\u5acc\u306a\u3084\u3064\u3067\u3059\u3002<\/p>\n\n\n\n<div style=\"border-color:#caecec;border-width:1px;border-style:solid;border-radius:8px;background-color:#f2fbfb;margin-top:1.8em;margin-bottom:2em;padding:16px 18px\"><p style=\"line-height:2;margin:0\">\u6307\u5b9a\u4e00\u89a7\u306e\u4e0d\u8db3\u3092\u898b\u305f\u3044\u3068\u304d\u306f\u3001\u307e\u305a\u78ba\u8a8d\u3057\u305f\u3044ID\u4e00\u89a7\u3092SQL\u5185\u306e\u5c0f\u3055\u306a\u8868\u3068\u3057\u3066\u4f5c\u308a\u307e\u3059\u3002\u305d\u306e\u8868\u3092DB\u306e\u30c6\u30fc\u30d6\u30eb\u3068\u7a81\u304d\u5408\u308f\u305b\u308b\u3068\u3001\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u5024\u3060\u3051\u3092\u7d50\u679c\u3068\u3057\u3066\u8fd4\u305b\u307e\u3059\u3002<\/p><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30c0\u30df\u30fc\u306e <code>customers<\/code> \u30c6\u30fc\u30d6\u30eb\u3092\u4f7f\u3044\u307e\u3059\u3002 \u78ba\u8a8d\u5bfe\u8c61\u306f <code>1001, 1002, 1003, 1004, 1005<\/code> \u306e5\u4ef6\u3067\u3059\u3002 \u3053\u306e\u3046\u3061\u3001\u30c6\u30fc\u30d6\u30eb\u306b\u5b58\u5728\u3057\u306a\u3044ID\u3092SQL\u3067\u51fa\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">IN\u53e5\u3067\u78ba\u8a8d\u3059\u308b\u3068\u5b58\u5728\u3059\u308bID\u3060\u3051\u304c\u8fd4\u308b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30c0\u30df\u30fc\u306e\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u3092\u7528\u610f\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u3001\u78ba\u8a8d\u5148\u306b\u306a\u308b\u9867\u5ba2\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u308a\u307e\u3059\u3002 \u3053\u3053\u3067\u306fSQLite\u3067\u52d5\u304b\u305b\u308b\u5f62\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u8003\u3048\u65b9\u306fOracle\u3067\u3082\u540c\u3058\u3067\u3059\u3002 \u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u306a\u3089\u3001\u9867\u5ba2\u3001\u53d6\u5f15\u5148\u3001\u5546\u54c1\u3001\u90e8\u7f72\u3001\u793e\u54e1\u3001\u8acb\u6c42\u5148\u3042\u305f\u308a\u306e\u30de\u30b9\u30bf\u78ba\u8a8d\u3067\u3088\u304f\u51fa\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>CREATE TABLE customers (\n    customer_id INTEGER PRIMARY KEY,\n    customer_name TEXT NOT NULL,\n    status TEXT NOT NULL\n);\n\nINSERT INTO customers (customer_id, customer_name, status) VALUES\n    (1001, 'Aoba Trading', 'active'),\n    (1002, 'Kitamachi Works', 'active'),\n    (1004, 'Nanko Logistics', 'inactive'),\n    (1007, 'Chuo Foods', 'active');<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">CREATE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">TABLE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">customers<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id <\/span><span style=\"color: #81A1C1\">INTEGER<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">PRIMARY KEY<\/span><span style=\"color: #D8DEE9FF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_name <\/span><span style=\"color: #81A1C1\">TEXT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">NOT NULL<\/span><span style=\"color: #D8DEE9FF\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">status<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">TEXT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">NOT NULL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">INSERT INTO<\/span><span style=\"color: #D8DEE9FF\"> customers (customer_id, customer_name, <\/span><span style=\"color: #81A1C1\">status<\/span><span style=\"color: #D8DEE9FF\">) <\/span><span style=\"color: #81A1C1\">VALUES<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Aoba Trading<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">active<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    (<\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Kitamachi Works<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">active<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    (<\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Nanko Logistics<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">inactive<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">),<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    (<\/span><span style=\"color: #B48EAD\">1007<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">Chuo Foods<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">active<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6295\u5165\u5f8c\u306e\u4e2d\u8eab\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>customer_id | customer_name     | status\n1001        | Aoba Trading      | active\n1002        | Kitamachi Works   | active\n1004        | Nanko Logistics   | inactive\n1007        | Chuo Foods        | active<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">customer_id | customer_name     | status<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1001        | Aoba Trading      | active<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1002        | Kitamachi Works   | active<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1004        | Nanko Logistics   | inactive<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1007        | Chuo Foods        | active<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8868\u306b\u306f\u3001<code>1001<\/code>\u3001<code>1002<\/code>\u3001<code>1004<\/code>\u3001<code>1007<\/code> \u304c\u5165\u3063\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u6642\u70b9\u3067\u3001\u4eba\u9593\u306e\u76ee\u3067\u306f <code>1003<\/code> \u3068 <code>1005<\/code> \u304c\u7121\u3044\u3068\u5206\u304b\u308a\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u5b9f\u52d9\u3067\u306f\u4e00\u89a7\u304c50\u4ef6\u3001100\u4ef6\u3001500\u4ef6\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u76ee\u3067\u898b\u3066\u63a2\u3059\u3068\u3001\u629c\u3051\u3082\u8ee2\u8a18\u30df\u30b9\u3082\u8d77\u304d\u307e\u3059\u3002<\/p>\n\n\n<div class=\"swell-block-balloon\"><div class=\"c-balloon -bln-left\" data-col=\"gray\"><div class=\"c-balloon__icon -circle\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.nexive.tech\/wp-content\/uploads\/2026\/05\/concern-150x150.png\" alt=\"\" class=\"c-balloon__iconImg\" width=\"80px\" height=\"80px\"><span class=\"c-balloon__iconName\">tomo<\/span><\/div><div class=\"c-balloon__body -speaking -border-on\"><div class=\"c-balloon__text\">\n<p>ID\u4e00\u89a7\u304c\u77ed\u3044\u3068\u76ee\u3067\u8ffd\u3048\u307e\u3059\u304c\u3001\u4ef6\u6570\u304c\u5897\u3048\u308b\u3068\u6025\u306b\u5371\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u78ba\u8a8d\u4f5c\u696d\u3067\u306f\u3001\u5b58\u5728\u3057\u305f\u3082\u306e\u3088\u308a\u3001\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u3082\u306e\u3092\u6a5f\u68b0\u7684\u306b\u8fd4\u3059\u5f62\u306b\u3057\u305f\u65b9\u304c\u6b8b\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<span class=\"c-balloon__shapes\"><span class=\"c-balloon__before\"><\/span><span class=\"c-balloon__after\"><\/span><\/span><\/div><\/div><\/div><\/div>\n\n\n<h3 class=\"wp-block-heading\">IN\u53e5\u3067\u691c\u7d22\u3057\u305f\u7d50\u679c\u3092\u898b\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u78ba\u8a8d\u3057\u305f\u3044ID\u4e00\u89a7\u3092\u3001\u6b21\u306e5\u4ef6\u3060\u3068\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>1001\n1002\n1003\n1004\n1005<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">1001<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1002<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1003<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1004<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1005<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u3001\u3088\u304f\u66f8\u304f <code>IN<\/code> \u306eSQL\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT\n    customer_id,\n    customer_name,\n    status\nFROM\n    customers\nWHERE\n    customer_id IN (1001, 1002, 1003, 1004, 1005)\nORDER BY\n    customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_name,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">status<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customers<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">WHERE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id <\/span><span style=\"color: #81A1C1\">IN<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>customer_id | customer_name     | status\n1001        | Aoba Trading      | active\n1002        | Kitamachi Works   | active\n1004        | Nanko Logistics   | inactive<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">customer_id | customer_name     | status<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1001        | Aoba Trading      | active<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1002        | Kitamachi Works   | active<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1004        | Nanko Logistics   | inactive<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>1001<\/code>\u3001<code>1002<\/code>\u3001<code>1004<\/code> \u306f\u8fd4\u308a\u307e\u3057\u305f\u3002 \u3067\u3082\u3001<code>1003<\/code> \u3068 <code>1005<\/code> \u306f\u7d50\u679c\u306b\u51fa\u307e\u305b\u3093\u3002 \u3053\u308c\u306f\u30a8\u30e9\u30fc\u3067\u306f\u306a\u304f\u3001<code>IN<\/code> \u306e\u666e\u901a\u306e\u52d5\u304d\u3067\u3059\u3002 <code>IN<\/code> \u306f\u3001\u6307\u5b9a\u3057\u305f\u5024\u306b\u4e00\u81f4\u3057\u305f\u30c6\u30fc\u30d6\u30eb\u884c\u3092\u8fd4\u3057\u307e\u3059\u3002 <span class=\"swl-marker mark_orange\"><strong>\u4e00\u81f4\u3057\u306a\u304b\u3063\u305f\u6307\u5b9a\u5024\u305d\u306e\u3082\u306e\u306f\u3001\u7d50\u679c\u30bb\u30c3\u30c8\u306b\u6b8b\u308a\u307e\u305b\u3093<\/strong><\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u8a70\u307e\u308a\u3084\u3059\u3044\u306e\u306f\u3001SQL\u306e\u7d50\u679c\u3060\u3051\u3092\u898b\u308b\u3068\u4e0d\u8db3\u5206\u304c\u5206\u304b\u3089\u306a\u3044\u3053\u3068\u3067\u3059\u3002 \u78ba\u8a8d\u5bfe\u8c615\u4ef6\u306b\u5bfe\u3057\u3066\u7d50\u679c3\u4ef6\u306a\u306e\u3067\u30012\u4ef6\u8db3\u308a\u306a\u3044\u3053\u3068\u306f\u5206\u304b\u308a\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u3069\u306e2\u4ef6\u304c\u7121\u3044\u306e\u304b\u306f\u3001\u5143\u306e\u4e00\u89a7\u3068\u7d50\u679c\u3092\u898b\u6bd4\u3079\u306a\u3044\u3068\u5206\u304b\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">NOT IN\u3067\u306f\u4e0d\u8db3ID\u306e\u78ba\u8a8d\u306b\u306a\u3089\u306a\u3044<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">NOT IN\u304c\u8fd4\u3059\u306e\u306f\u30c6\u30fc\u30d6\u30eb\u5074\u306e\u5225\u30c7\u30fc\u30bf<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u300cIN\u306e\u9006\u306a\u3089NOT IN\u3067\u306f\u300d\u3068\u8003\u3048\u305f\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u308c\u306f\u81ea\u7136\u3067\u3059\u3002 \u305f\u3060\u3001\u4eca\u56de\u306e\u76ee\u7684\u3067\u306f\u9055\u3046\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>SELECT\n    customer_id,\n    customer_name\nFROM\n    customers\nWHERE\n    customer_id NOT IN (1001, 1002, 1003, 1004, 1005)\nORDER BY\n    customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_name<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customers<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">WHERE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id <\/span><span style=\"color: #81A1C1\">NOT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">IN<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>customer_id | customer_name\n1007        | Chuo Foods<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">customer_id | customer_name<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1007        | Chuo Foods<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>1007<\/code> \u304c\u8fd4\u308a\u307e\u3057\u305f\u3002 \u3053\u308c\u306f\u300c\u78ba\u8a8d\u5bfe\u8c61\u306e\u4e00\u89a7\u306b\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u304c\u3001customers\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u5b58\u5728\u3059\u308bID\u300d\u3067\u3059\u3002 \u4eca\u56de\u77e5\u308a\u305f\u3044 <code>1003<\/code> \u3068 <code>1005<\/code> \u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>NOT IN<\/code> \u306f\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u304b\u3089\u300c\u3053\u306e\u4e00\u89a7\u306b\u8a72\u5f53\u3057\u306a\u3044\u884c\u300d\u3092\u63a2\u3057\u307e\u3059\u3002 \u78ba\u8a8d\u3057\u305f\u3044\u4e00\u89a7\u306e\u4e2d\u304b\u3089\u300c\u30c6\u30fc\u30d6\u30eb\u306b\u7121\u3044\u5024\u300d\u3092\u63a2\u3059\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 <span class=\"swl-marker mark_yellow\">\u5de6\u5074\u306b\u7f6e\u304b\u308c\u3066\u3044\u308b\u5bfe\u8c61\u304c\u3001customers\u30c6\u30fc\u30d6\u30eb\u3060\u304b\u3089\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<div style=\"border-color:#f1d48b;border-width:1px;border-style:solid;border-radius:8px;background-color:#fff8e6;margin-top:1.8em;margin-bottom:2em;padding:16px 18px\"><p style=\"line-height:2;margin:0\">\u4e0d\u8db3ID\u3092\u51fa\u3057\u305f\u3044\u5834\u9762\u3067 <code>NOT IN<\/code> \u3092\u4f7f\u3046\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u5074\u306b\u3042\u308b\u5225\u306eID\u304c\u8fd4\u308a\u307e\u3059\u3002\u4eca\u56de\u306e\u3088\u3046\u306b\u300c\u6e21\u3055\u308c\u305f\u4e00\u89a7\u306e\u4e2d\u3067\u7121\u304b\u3063\u305f\u3082\u306e\u300d\u3092\u898b\u305f\u3044\u5834\u5408\u306f\u3001\u78ba\u8a8d\u5bfe\u8c61\u306e\u4e00\u89a7\u3092\u5de6\u5074\u306b\u7f6e\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u6b32\u3057\u3044\u7d50\u679c\u3092\u8a00\u8449\u3067\u56fa\u5b9a\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">SQL\u3092\u66f8\u304f\u524d\u306b\u3001\u6b32\u3057\u3044\u7d50\u679c\u3092\u4e00\u6587\u3067\u56fa\u5b9a\u3057\u307e\u3059\u3002 \u4eca\u56de\u306f\u6b21\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\u78ba\u8a8d\u5bfe\u8c61ID\u4e00\u89a7\u306e\u3046\u3061\u3001customers.customer_id \u306b\u5b58\u5728\u3057\u306a\u3044ID\u3092\u8fd4\u3059<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">\u78ba\u8a8d\u5bfe\u8c61ID\u4e00\u89a7\u306e\u3046\u3061\u3001customers.customer_id \u306b\u5b58\u5728\u3057\u306a\u3044ID\u3092\u8fd4\u3059<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u6587\u3067\u4e3b\u8a9e\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u306f\u3001<code>customers<\/code> \u30c6\u30fc\u30d6\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u4e3b\u8a9e\u306f\u3001\u6e21\u3055\u308c\u305f\u78ba\u8a8d\u5bfe\u8c61ID\u4e00\u89a7\u3067\u3059\u3002 \u3060\u304b\u3089\u3001SQL\u3067\u3082\u78ba\u8a8d\u5bfe\u8c61ID\u4e00\u89a7\u3092\u5148\u306b\u8868\u3068\u3057\u3066\u4f5c\u308a\u3001\u305d\u306e\u8868\u3092\u57fa\u6e96\u306b\u3057\u3066\u7d50\u5408\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3092\u66d6\u6627\u306b\u3059\u308b\u3068\u3001<code>IN<\/code>\u3001<code>NOT IN<\/code>\u3001<code>EXISTS<\/code>\u3001<code>LEFT JOIN<\/code> \u306e\u540d\u524d\u3060\u3051\u3092\u884c\u304d\u6765\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002 \u899a\u3048\u308b\u3079\u304d\u306a\u306e\u306f\u69cb\u6587\u540d\u3088\u308a\u3001<span class=\"swl-marker mark_yellow\">\u3069\u3061\u3089\u306e\u4e00\u89a7\u3092\u57fa\u6e96\u306b\u3057\u3066\u7d50\u679c\u3092\u8fd4\u3059\u304b<\/span> \u3067\u3059\u3002<\/p>\n\n\n<div class=\"swell-block-balloon\"><div class=\"c-balloon -bln-left\" data-col=\"gray\"><div class=\"c-balloon__icon -circle\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.nexive.tech\/wp-content\/uploads\/2026\/05\/small-smile-150x150.png\" alt=\"\" class=\"c-balloon__iconImg\" width=\"80px\" height=\"80px\"><span class=\"c-balloon__iconName\">tomo<\/span><\/div><div class=\"c-balloon__body -speaking -border-on\"><div class=\"c-balloon__text\">\n<p>\u8ff7\u3063\u305f\u3089\u3001\u300c\u7d50\u679c\u306b\u6b8b\u3057\u305f\u3044\u4e00\u89a7\u306f\u3069\u3061\u3089\u304b\u300d\u3092\u5148\u306b\u6c7a\u3081\u307e\u3059\u3002\u4eca\u56de\u306a\u3089\u3001\u6b8b\u3057\u305f\u3044\u306e\u306f\u6e21\u3055\u308c\u305fID\u4e00\u89a7\u3067\u3059\u3002<\/p>\n<span class=\"c-balloon__shapes\"><span class=\"c-balloon__before\"><\/span><span class=\"c-balloon__after\"><\/span><\/span><\/div><\/div><\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\">ID\u4e00\u89a7\u3092\u5c0f\u3055\u306a\u8868\u3068\u3057\u3066\u4f5c\u308b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">VALUES\u3067\u78ba\u8a8d\u5bfe\u8c61ID\u3092\u8868\u306b\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">SQLite\u3067\u306f\u3001<code>WITH<\/code> \u3068 <code>VALUES<\/code> \u3092\u4f7f\u3046\u3068\u3001\u78ba\u8a8d\u5bfe\u8c61ID\u4e00\u89a7\u3092\u4e00\u6642\u7684\u306a\u8868\u306e\u3088\u3046\u306b\u6271\u3048\u307e\u3059\u3002 \u3053\u3053\u3067\u306f <code>target_ids<\/code> \u3068\u3044\u3046\u540d\u524d\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids(customer_id) AS (\n    VALUES (1001), (1002), (1003), (1004), (1005)\n)\nSELECT\n    customer_id\nFROM\n    target_ids\nORDER BY\n    customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids(customer_id) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">VALUES<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306eSQL\u306e\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>customer_id\n1001\n1002\n1003\n1004\n1005<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1001<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1002<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1003<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1004<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1005<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u3060 <code>customers<\/code> \u30c6\u30fc\u30d6\u30eb\u3068\u306f\u7d50\u5408\u3057\u3066\u3044\u307e\u305b\u3093\u3002 \u307e\u305a\u3001\u78ba\u8a8d\u3057\u305f\u3044ID\u4e00\u89a7\u3092SQL\u306e\u4e2d\u306b\u6301\u3061\u8fbc\u3093\u3060\u3060\u3051\u3067\u3059\u3002 \u3053\u3053\u3067\u3001\u5f8c\u7d9a\u306eSQL\u306e\u66f8\u304d\u3084\u3059\u3055\u304c\u5206\u304b\u308c\u307e\u3059\u3002 <code>IN (...)<\/code> \u306e\u62ec\u5f27\u5185\u306b\u66f8\u3044\u305f\u5024\u306f\u3001\u691c\u7d22\u6761\u4ef6\u3068\u3057\u3066\u306f\u4f7f\u3048\u3066\u3082\u3001\u7d50\u679c\u3068\u3057\u3066\u305d\u306e\u307e\u307e\u8fd4\u3059\u57fa\u6e96\u306b\u306f\u3057\u306b\u304f\u3044\u304b\u3089\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>target_ids<\/code> \u3068\u3044\u3046\u8868\u306b\u3057\u3066\u304a\u304f\u3068\u3001\u5404ID\u30921\u884c\u3068\u3057\u3066\u6271\u3048\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u3042\u3068\u3067 <code>customers<\/code> \u3068\u7d50\u5408\u3057\u305f\u3068\u304d\u3001\u7d50\u5408\u3067\u304d\u306a\u304b\u3063\u305f\u884c\u3082 <code>target_ids<\/code> \u5074\u306b\u306f\u6b8b\u305b\u307e\u3059\u3002 <span class=\"swl-marker mark_orange\"><strong>\u4e0d\u8db3ID\u3092\u51fa\u3059\u305f\u3081\u306e\u524d\u51e6\u7406\u306f\u3001\u78ba\u8a8d\u5bfe\u8c61\u3092\u8868\u306b\u3059\u308b\u3053\u3068\u3067\u3059<\/strong><\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Oracle\u3067\u306fDUAL\u3084\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u4e00\u89a7\u3092\u4f5c\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Oracle\u3067\u540c\u3058\u8003\u3048\u65b9\u3092\u4f7f\u3046\u306a\u3089\u3001\u53e4\u304f\u304b\u3089\u4f7f\u3048\u308b\u5f62\u306f <code>DUAL<\/code> \u3068 <code>UNION ALL<\/code> \u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids AS (\n    SELECT 1001 AS customer_id FROM dual\n    UNION ALL SELECT 1002 FROM dual\n    UNION ALL SELECT 1003 FROM dual\n    UNION ALL SELECT 1004 FROM dual\n    UNION ALL SELECT 1005 FROM dual\n)\nSELECT\n    customer_id\nFROM\n    target_ids\nORDER BY\n    customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">SELECT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> customer_id <\/span><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> dual<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">UNION ALL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">SELECT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> dual<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">UNION ALL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">SELECT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> dual<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">UNION ALL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">SELECT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> dual<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">UNION ALL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">SELECT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> dual<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6570\u5024ID\u3060\u3051\u306a\u3089\u3001Oracle\u306e\u7d44\u307f\u8fbc\u307f\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u77ed\u304f\u66f8\u3051\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids AS (\n    SELECT\n        column_value AS customer_id\n    FROM\n        TABLE(sys.odcinumberlist(1001, 1002, 1003, 1004, 1005))\n)\nSELECT\n    customer_id\nFROM\n    target_ids\nORDER BY\n    customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        column_value <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">TABLE<\/span><span style=\"color: #D8DEE9FF\">(sys.odcinumberlist(<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">, <\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3069\u3061\u3089\u3092\u4f7f\u3046\u304b\u306f\u3001\u73fe\u5834\u306eOracle\u30d0\u30fc\u30b8\u30e7\u30f3\u3001\u6a29\u9650\u3001SQL\u3092\u8cbc\u308b\u30c4\u30fc\u30eb\u306e\u7656\u3067\u5909\u308f\u308a\u307e\u3059\u3002 \u77ed\u3044\u78ba\u8a8d\u306a\u3089 <code>DUAL<\/code> \u3068 <code>UNION ALL<\/code> \u306f\u8aad\u307e\u308c\u3084\u3059\u3044\u3067\u3059\u3002 ID\u6570\u304c\u5c11\u3057\u591a\u3044\u306a\u3089\u3001<code>sys.odcinumberlist<\/code> \u306e\u65b9\u304c\u66f8\u304d\u3084\u3059\u3044\u5834\u9762\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"border-color:#caecec;border-width:1px;border-style:solid;border-radius:8px;background-color:#f2fbfb;margin-top:1.8em;margin-bottom:2em;padding:16px 18px\"><p style=\"line-height:2;margin:0\">Oracle\u3067\u3082SQLite\u3067\u3082\u3001\u8003\u3048\u65b9\u306f\u540c\u3058\u3067\u3059\u3002\u78ba\u8a8d\u5bfe\u8c61\u306eID\u4e00\u89a7\u3092 <code>target_ids<\/code> \u3068\u3057\u3066\u4f5c\u308a\u3001\u305d\u306e\u4e00\u89a7\u3092\u57fa\u6e96\u306bDB\u30c6\u30fc\u30d6\u30eb\u3078\u7a81\u304d\u5408\u308f\u305b\u307e\u3059\u3002<\/p><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">LEFT JOIN\u3067\u5b58\u5728\u3057\u306a\u3044ID\u3060\u3051\u3092\u51fa\u3059<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e00\u89a7\u3092\u5de6\u5074\u306b\u7f6e\u3044\u3066\u30c6\u30fc\u30d6\u30eb\u3068\u7d50\u5408\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8db3ID\u3092\u51fa\u3059\u672c\u547d\u306eSQL\u3067\u3059\u3002 \u30dd\u30a4\u30f3\u30c8\u306f\u3001<code>target_ids<\/code> \u3092\u5de6\u5074\u306b\u7f6e\u304f\u3053\u3068\u3067\u3059\u3002 \u5de6\u5074\u306b\u7f6e\u3044\u305f\u884c\u306f\u3001\u53f3\u5074\u306e <code>customers<\/code> \u306b\u4e00\u81f4\u3057\u306a\u304f\u3066\u3082\u6b8b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids(customer_id) AS (\n    VALUES (1001), (1002), (1003), (1004), (1005)\n)\nSELECT\n    t.customer_id AS missing_customer_id\nFROM\n    target_ids t\nLEFT JOIN customers c\n    ON c.customer_id = t.customer_id\nWHERE\n    c.customer_id IS NULL\nORDER BY\n    t.customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids(customer_id) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">VALUES<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> missing_customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids t<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">LEFT JOIN<\/span><span style=\"color: #D8DEE9FF\"> customers c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> c.customer_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> t.customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">WHERE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    c.customer_id <\/span><span style=\"color: #81A1C1\">IS<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">NULL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>missing_customer_id\n1003\n1005<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">missing_customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1003<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1005<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u3067\u3001\u78ba\u8a8d\u5bfe\u8c61ID\u4e00\u89a7\u306e\u3046\u3061\u3001<code>customers<\/code> \u306b\u5b58\u5728\u3057\u306a\u304b\u3063\u305fID\u3060\u3051\u304c\u8fd4\u308a\u307e\u3057\u305f\u3002 <code>1001<\/code>\u3001<code>1002<\/code>\u3001<code>1004<\/code> \u306f\u7d50\u5408\u3067\u304d\u305f\u306e\u3067\u9664\u5916\u3055\u308c\u307e\u3059\u3002 <code>1003<\/code> \u3068 <code>1005<\/code> \u306f\u7d50\u5408\u5148\u304c\u7121\u3044\u305f\u3081\u3001<code>c.customer_id<\/code> \u304c <code>NULL<\/code> \u306b\u306a\u308a\u307e\u3059\u3002 \u305d\u306e\u884c\u3060\u3051\u3092 <code>WHERE c.customer_id IS NULL<\/code> \u3067\u6b8b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5168\u4ef6\u306e\u5224\u5b9a\u7d50\u679c\u3082\u51fa\u3057\u3066\u78ba\u8a8d\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8db3ID\u3060\u3051\u3092\u8fd4\u3059\u524d\u306b\u3001\u5b58\u5728\u3057\u305f\u3082\u306e\u3068\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u3082\u306e\u3092\u4e00\u7dd2\u306b\u898b\u308bSQL\u3082\u4fbf\u5229\u3067\u3059\u3002 \u554f\u3044\u5408\u308f\u305b\u524d\u306e\u78ba\u8a8d\u3084\u3001\u4f5c\u696d\u30e1\u30e2\u306b\u8cbc\u308b\u7528\u9014\u3067\u306f\u3053\u3061\u3089\u306e\u65b9\u304c\u8aac\u660e\u3057\u3084\u3059\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids(customer_id) AS (\n    VALUES (1001), (1002), (1003), (1004), (1005)\n)\nSELECT\n    t.customer_id AS checked_customer_id,\n    CASE\n        WHEN c.customer_id IS NULL THEN 'missing'\n        ELSE 'exists'\n    END AS check_result,\n    c.customer_name,\n    c.status\nFROM\n    target_ids t\nLEFT JOIN customers c\n    ON c.customer_id = t.customer_id\nORDER BY\n    t.customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids(customer_id) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">VALUES<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> checked_customer_id,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">CASE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">WHEN<\/span><span style=\"color: #D8DEE9FF\"> c.customer_id <\/span><span style=\"color: #81A1C1\">IS<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">NULL<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">THEN<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">missing<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">ELSE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">exists<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">END<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> check_result,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    c.customer_name,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    c.status<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids t<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">LEFT JOIN<\/span><span style=\"color: #D8DEE9FF\"> customers c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> c.customer_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> t.customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>checked_customer_id | check_result | customer_name     | status\n1001                | exists       | Aoba Trading      | active\n1002                | exists       | Kitamachi Works   | active\n1003                | missing      | NULL              | NULL\n1004                | exists       | Nanko Logistics   | inactive\n1005                | missing      | NULL              | NULL<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">checked_customer_id | check_result | customer_name     | status<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1001                | exists       | Aoba Trading      | active<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1002                | exists       | Kitamachi Works   | active<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1003                | missing      | NULL              | NULL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1004                | exists       | Nanko Logistics   | inactive<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1005                | missing      | NULL              | NULL<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u7d50\u679c\u3092\u898b\u308b\u3068\u3001<code>1003<\/code> \u3068 <code>1005<\/code> \u304c <code>missing<\/code> \u3067\u3059\u3002 \u540c\u6642\u306b\u3001<code>1004<\/code> \u306f\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u304c <code>inactive<\/code> \u3067\u3059\u3002 \u696d\u52d9\u4e0a\u306f\u300c\u5b58\u5728\u3057\u306a\u3044\u300d\u3060\u3051\u3067\u306a\u304f\u3001\u300c\u5b58\u5728\u3059\u308b\u304c\u7121\u52b9\u300d\u3068\u3044\u3046\u5225\u554f\u984c\u304c\u6df7\u3056\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u6700\u521d\u304b\u3089\u4e0d\u8db3ID\u3060\u3051\u3092\u51fa\u3059\u3088\u308a\u3001\u78ba\u8a8d\u4f5c\u696d\u3067\u306f\u5168\u4ef6\u5224\u5b9a\u3092\u4e00\u5ea6\u898b\u305f\u65b9\u304c\u5b89\u5168\u306a\u5834\u9762\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span class=\"swl-marker mark_yellow\">\u4f5c\u696d\u30e1\u30e2\u306b\u6b8b\u3059\u306a\u3089\u3001\u4e0d\u8db3ID\u3060\u3051\u306e\u7d50\u679c\u3068\u5168\u4ef6\u5224\u5b9a\u306e\u7d50\u679c\u3092\u5206\u3051\u308b\u3068\u8aac\u660e\u3057\u3084\u3059\u3044\u3067\u3059\u3002<\/span><\/p>\n\n\n<div class=\"swell-block-balloon\"><div class=\"c-balloon -bln-left\" data-col=\"gray\"><div class=\"c-balloon__icon -circle\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.nexive.tech\/wp-content\/uploads\/2026\/05\/big-smile-150x150.png\" alt=\"\" class=\"c-balloon__iconImg\" width=\"80px\" height=\"80px\"><span class=\"c-balloon__iconName\">tomo<\/span><\/div><div class=\"c-balloon__body -speaking -border-on\"><div class=\"c-balloon__text\">\n<p>\u4e0d\u8db3ID\u3060\u3051\u3092\u8fd4\u3059SQL\u306f\u5831\u544a\u7528\u306b\u5f37\u3044\u3067\u3059\u3002\u5168\u4ef6\u5224\u5b9a\u306eSQL\u306f\u3001\u306a\u305c\u305d\u306e\u7d50\u679c\u306b\u306a\u3063\u305f\u304b\u3092\u78ba\u8a8d\u3059\u308b\u9014\u4e2d\u7d4c\u904e\u3068\u3057\u3066\u4f7f\u3044\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<span class=\"c-balloon__shapes\"><span class=\"c-balloon__before\"><\/span><span class=\"c-balloon__after\"><\/span><\/span><\/div><\/div><\/div><\/div>\n\n\n<h2 class=\"wp-block-heading\">NOT EXISTS\u3067\u540c\u3058\u7d50\u679c\u3092\u78ba\u8a8d\u3059\u308b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u76f8\u95a2\u30b5\u30d6\u30af\u30a8\u30ea\u3067\u5b58\u5728\u3057\u306a\u3044\u884c\u3092\u5224\u5b9a\u3059\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>NOT EXISTS<\/code> \u3067\u3082\u540c\u3058\u4e0d\u8db3ID\u3092\u8fd4\u305b\u307e\u3059\u3002 <code>target_ids<\/code> \u306e\u5404\u884c\u306b\u3064\u3044\u3066\u3001<code>customers<\/code> \u306b\u540c\u3058ID\u304c\u5b58\u5728\u3059\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3001\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u884c\u3060\u3051\u3092\u6b8b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids(customer_id) AS (\n    VALUES (1001), (1002), (1003), (1004), (1005)\n)\nSELECT\n    t.customer_id AS missing_customer_id\nFROM\n    target_ids t\nWHERE\n    NOT EXISTS (\n        SELECT\n            1\n        FROM\n            customers c\n        WHERE\n            c.customer_id = t.customer_id\n    )\nORDER BY\n    t.customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids(customer_id) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">VALUES<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1004<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> missing_customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids t<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">WHERE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">NOT<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">EXISTS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            <\/span><span style=\"color: #B48EAD\">1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            customers c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        <\/span><span style=\"color: #81A1C1\">WHERE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">            c.customer_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> t.customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    )<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u884c\u7d50\u679c\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>missing_customer_id\n1003\n1005<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">missing_customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1003<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">1005<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><code>LEFT JOIN<\/code> \u7248\u3068\u540c\u3058\u7d50\u679c\u3067\u3059\u3002 <code>NOT EXISTS<\/code> \u306f\u3001<code>target_ids<\/code> \u306e1\u884c\u3054\u3068\u306b\u300c\u540c\u3058ID\u306e\u9867\u5ba2\u304c\u5b58\u5728\u3059\u308b\u304b\u300d\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u5b58\u5728\u3057\u306a\u3051\u308c\u3070\u3001\u305d\u306e <code>target_ids<\/code> \u306e\u884c\u3092\u8fd4\u3057\u307e\u3059\u3002 \u8aad\u307f\u65b9\u3068\u3057\u3066\u3082\u8ffd\u3044\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">LEFT JOIN\u3068NOT EXISTS\u306e\u4f7f\u3044\u5206\u3051<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u78ba\u8a8d\u4f5c\u696d\u3067\u306f\u3001\u307e\u305a <code>LEFT JOIN<\/code> \u7248\u3092\u4f7f\u3046\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002 \u7406\u7531\u306f\u3001\u5b58\u5728\u3057\u305f\u884c\u306e\u540d\u524d\u3084\u72b6\u614b\u3082\u4e00\u7dd2\u306b\u51fa\u3057\u3084\u3059\u3044\u304b\u3089\u3067\u3059\u3002 \u5148\u307b\u3069\u306e\u5168\u4ef6\u5224\u5b9a\u306e\u3088\u3046\u306b\u3001<code>exists<\/code> \u3068 <code>missing<\/code> \u3092\u4e26\u3079\u308b\u5f62\u3078\u5e83\u3052\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>NOT EXISTS<\/code> \u306f\u3001\u4e0d\u8db3ID\u3060\u3051\u3092\u304d\u308c\u3044\u306b\u8fd4\u3057\u305f\u3044\u3068\u304d\u306b\u8aad\u307f\u3084\u3059\u3044\u3067\u3059\u3002 \u7d50\u5408\u5148\u306e\u5217\u3092\u7d50\u679c\u306b\u51fa\u3055\u306a\u3044\u306a\u3089\u3001SQL\u306e\u610f\u56f3\u3082\u306f\u3063\u304d\u308a\u3057\u307e\u3059\u3002 \u305f\u3060\u3057\u3001\u6761\u4ef6\u304c\u5897\u3048\u308b\u3068\u30b5\u30d6\u30af\u30a8\u30ea\u306e\u4e2d\u306b\u696d\u52d9\u6761\u4ef6\u304c\u5165\u308a\u3001\u8aad\u307f\u6163\u308c\u3066\u3044\u306a\u3044\u4eba\u306b\u306f\u5c11\u3057\u8ffd\u3044\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3069\u3061\u3089\u304c\u7d76\u5bfe\u306b\u6b63\u3057\u3044\u3001\u3068\u3044\u3046\u8a71\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u78ba\u8a8d\u4f5c\u696d\u3067\u306f\u3001<span class=\"swl-marker mark_yellow\">\u9014\u4e2d\u7d4c\u904e\u3092\u8aac\u660e\u3057\u305f\u3044\u306a\u3089LEFT JOIN\u3001\u4e0d\u8db3\u5206\u3060\u3051\u8fd4\u3057\u305f\u3044\u306a\u3089NOT EXISTS<\/span> \u304f\u3089\u3044\u3067\u9078\u3076\u3068\u6271\u3044\u3084\u3059\u3044\u3067\u3059\u3002 \u5b9f\u884c\u6027\u80fd\u3092\u53b3\u5bc6\u306b\u898b\u308b\u5834\u9762\u3067\u306f\u3001\u5bfe\u8c61DB\u306e\u5b9f\u884c\u8a08\u753b\u3068\u4ef6\u6570\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5b9f\u52d9\u3067\u4f7f\u3046\u524d\u306b\u898b\u308b\u78ba\u8a8d\u30dd\u30a4\u30f3\u30c8<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u91cd\u8907ID\u304c\u3042\u308b\u3068\u4ef6\u6570\u306e\u898b\u3048\u65b9\u304c\u5909\u308f\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6e21\u3055\u308c\u305f\u4e00\u89a7\u306b\u540c\u3058ID\u304c\u91cd\u8907\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001<code>1003<\/code> \u304c2\u56de\u5165\u3063\u3066\u3044\u308b\u5834\u5408\u3001<code>target_ids<\/code> \u3092\u305d\u306e\u307e\u307e\u4f5c\u308b\u3068\u4e0d\u8db3\u7d50\u679c\u306b\u30822\u884c\u51fa\u307e\u3059\u3002 \u3053\u308c\u306fSQL\u3068\u3057\u3066\u306f\u81ea\u7136\u3067\u3059\u3002 \u78ba\u8a8d\u5bfe\u8c61\u4e00\u89a7\u306b2\u884c\u3042\u308b\u304b\u3089\u3001\u7d50\u679c\u306b\u30822\u884c\u6b8b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5831\u544a\u3067\u300c\u4e0d\u8db3ID\u306f\u4f55\u7a2e\u985e\u304b\u300d\u3092\u898b\u305f\u3044\u306a\u3089\u3001<code>SELECT DISTINCT<\/code> \u3092\u4f7f\u3044\u307e\u3059\u3002 \u4e00\u65b9\u3067\u3001\u5143\u4e00\u89a7\u306e\u884c\u6570\u3068\u7a81\u304d\u5408\u308f\u305b\u305f\u3044\u306a\u3089\u3001\u91cd\u8907\u3092\u6b8b\u3057\u305f\u307e\u307e\u78ba\u8a8d\u3057\u305f\u65b9\u304c\u3088\u3044\u3067\u3059\u3002 \u3053\u3053\u3092\u6c7a\u3081\u305a\u306bSQL\u3060\u3051\u76f4\u3059\u3068\u3001\u4ef6\u6570\u304c\u5408\u3063\u305f\u308a\u5408\u308f\u306a\u304b\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_ids(customer_id) AS (\n    VALUES (1001), (1002), (1003), (1003), (1005)\n)\nSELECT DISTINCT\n    t.customer_id AS missing_customer_id\nFROM\n    target_ids t\nLEFT JOIN customers c\n    ON c.customer_id = t.customer_id\nWHERE\n    c.customer_id IS NULL\nORDER BY\n    t.customer_id;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_ids(customer_id) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">VALUES<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #B48EAD\">1001<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1002<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1003<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #B48EAD\">1005<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT DISTINCT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> missing_customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_ids t<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">LEFT JOIN<\/span><span style=\"color: #D8DEE9FF\"> customers c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> c.customer_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> t.customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">WHERE<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    c.customer_id <\/span><span style=\"color: #81A1C1\">IS<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">NULL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    t.customer_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><span class=\"swl-marker mark_orange\"><strong>\u91cd\u8907\u3092\u6d88\u3059\u304b\u6b8b\u3059\u304b\u306f\u3001SQL\u306e\u597d\u307f\u3067\u306f\u306a\u304f\u78ba\u8a8d\u76ee\u7684\u3067\u6c7a\u3081\u307e\u3059<\/strong><\/span> \u53d6\u8fbc\u524d\u30c1\u30a7\u30c3\u30af\u306a\u3089\u91cd\u8907\u3082\u554f\u984c\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u554f\u3044\u5408\u308f\u305b\u56de\u7b54\u306a\u3089\u3001\u30e6\u30cb\u30fc\u30af\u306a\u4e0d\u8db3ID\u3060\u3051\u3067\u8db3\u308a\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6587\u5b57\u5217ID\u306f\u524d\u5f8c\u30b9\u30da\u30fc\u30b9\u3068\u30bc\u30ed\u57cb\u3081\u3092\u898b\u308b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u9867\u5ba2ID\u3084\u5546\u54c1\u30b3\u30fc\u30c9\u304c\u6587\u5b57\u5217\u306e\u5834\u5408\u306f\u3001\u524d\u5f8c\u30b9\u30da\u30fc\u30b9\u3068\u30bc\u30ed\u57cb\u3081\u3092\u898b\u307e\u3059\u3002 <code>00123<\/code> \u3068 <code>123<\/code> \u306f\u3001\u6587\u5b57\u5217\u3068\u3057\u3066\u306f\u5225\u306e\u5024\u3067\u3059\u3002 Excel\u304b\u3089\u8cbc\u3063\u305f\u4e00\u89a7\u3067\u306f\u3001\u898b\u305f\u76ee\u3067\u306f\u5206\u304b\u3089\u306a\u3044\u7a7a\u767d\u304c\u6df7\u3056\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u78ba\u8a8d\u3067\u306f\u3001\u3044\u304d\u306a\u308a <code>TRIM<\/code> \u3084\u30bc\u30ed\u57cb\u3081\u5909\u63db\u3092\u5165\u308c\u308b\u3088\u308a\u3001\u307e\u305a\u751f\u306e\u5024\u3067\u4e0d\u4e00\u81f4\u3092\u898b\u307e\u3059\u3002 \u305d\u306e\u5f8c\u3067\u3001\u7a7a\u767d\u3092\u9664\u3044\u305f\u3089\u4e00\u81f4\u3059\u308b\u306e\u304b\u3001\u30bc\u30ed\u57cb\u3081\u3057\u305f\u3089\u4e00\u81f4\u3059\u308b\u306e\u304b\u3092\u5225SQL\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002 \u3053\u306e\u9806\u756a\u306b\u3059\u308b\u3068\u3001\u300c\u5143\u30c7\u30fc\u30bf\u304c\u60aa\u3044\u300d\u306e\u304b\u300c\u78ba\u8a8dSQL\u304c\u5f62\u5f0f\u5dee\u3092\u5438\u53ce\u3057\u3066\u3044\u308b\u3060\u3051\u300d\u306a\u306e\u304b\u3092\u5206\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">SQL<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>WITH target_codes(code) AS (\n    VALUES ('00123'), (' 00124'), ('125')\n)\nSELECT\n    code,\n    LENGTH(code) AS code_length\nFROM\n    target_codes;<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">WITH<\/span><span style=\"color: #D8DEE9FF\"> target_codes(code) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">VALUES<\/span><span style=\"color: #D8DEE9FF\"> (<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">00123<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\"> 00124<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">), (<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">125<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    code,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">LENGTH<\/span><span style=\"color: #D8DEE9FF\">(code) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> code_length<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    target_codes;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u6587\u5b57\u5217\u30b3\u30fc\u30c9\u306e\u4e0d\u8db3\u78ba\u8a8d\u3067\u306f\u3001<code>LENGTH<\/code> \u3092\u4e00\u7dd2\u306b\u51fa\u3059\u3060\u3051\u3067\u3082\u3001\u524d\u5f8c\u30b9\u30da\u30fc\u30b9\u306b\u6c17\u3065\u304d\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u5730\u5473\u3067\u3059\u304c\u3001\u3053\u3046\u3044\u3046\u78ba\u8a8d\u306e\u65b9\u304c\u4e8b\u6545\u3092\u6e1b\u3089\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7d50\u679c\u3092\u554f\u3044\u5408\u308f\u305b\u30e1\u30e2\u306b\u6b8b\u3059<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8db3ID\u3092\u8fd4\u305b\u305f\u3089\u3001\u6700\u5f8c\u306b\u78ba\u8a8d\u6761\u4ef6\u3092\u6b8b\u3057\u307e\u3059\u3002 SQL\u3060\u3051\u3092\u6b8b\u3059\u3088\u308a\u3001\u6b21\u306e\u60c5\u5831\u3092\u4e00\u7dd2\u306b\u66f8\u304f\u65b9\u304c\u3042\u3068\u3067\u8aad\u307f\u8fd4\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#2e3440\"><span style=\"background:#c8d0e0;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#2e3440\">Markdown<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\u78ba\u8a8d\u65e5\u6642: 2026-07-30 18:20\n\u78ba\u8a8d\u5bfe\u8c61: \u9867\u5ba2ID 1001, 1002, 1003, 1004, 1005\n\u78ba\u8a8d\u5148: customers.customer_id\n\u78ba\u8a8d\u7d50\u679c: 1003, 1005 \u304c\u5b58\u5728\u3057\u306a\u3044\n\u88dc\u8db3: 1004 \u306f\u5b58\u5728\u3059\u308b\u304c status = inactive<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">\u78ba\u8a8d\u65e5\u6642: 2026-07-30 18:20<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">\u78ba\u8a8d\u5bfe\u8c61: \u9867\u5ba2ID 1001, 1002, 1003, 1004, 1005<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">\u78ba\u8a8d\u5148: customers.customer_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">\u78ba\u8a8d\u7d50\u679c: 1003, 1005 \u304c\u5b58\u5728\u3057\u306a\u3044<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">\u88dc\u8db3: 1004 \u306f\u5b58\u5728\u3059\u308b\u304c status = inactive<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u30e1\u30e2\u304c\u3042\u308b\u3068\u3001\u554f\u3044\u5408\u308f\u305b\u3078\u306e\u56de\u7b54\u304c\u77ed\u304f\u306a\u308a\u307e\u3059\u3002 \u300c1003\u30681005\u306f\u672a\u767b\u9332\u3067\u3059\u300d\u3060\u3051\u3067\u306f\u3001\u3069\u306e\u4e00\u89a7\u3092\u898b\u305f\u306e\u304b\u3001\u3069\u306e\u30c6\u30fc\u30d6\u30eb\u3067\u78ba\u8a8d\u3057\u305f\u306e\u304b\u304c\u6b8b\u308a\u307e\u305b\u3093\u3002 \u4fdd\u5b88\u4f5c\u696d\u3067\u306f\u3001\u5f8c\u304b\u3089\u540c\u3058\u78ba\u8a8d\u3092\u3084\u308a\u76f4\u3059\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"border-color:#caecec;border-width:1px;border-style:solid;border-radius:8px;background-color:#f2fbfb;margin-top:1.8em;margin-bottom:2em;padding:16px 18px\"><p style=\"line-height:2;margin:0\">\u4e0d\u8db3ID\u306eSQL\u306f\u3001\u66f8\u3051\u308b\u3053\u3068\u81ea\u4f53\u3088\u308a\u3001\u78ba\u8a8d\u6761\u4ef6\u3068\u7d50\u679c\u3092\u6b8b\u305b\u308b\u3053\u3068\u304c\u5927\u4e8b\u3067\u3059\u3002\u5bfe\u8c61\u4e00\u89a7\u3001\u78ba\u8a8d\u5148\u30c6\u30fc\u30d6\u30eb\u3001\u5b9f\u884c\u7d50\u679c\u3001\u88dc\u8db3\u6761\u4ef6\u3092\u30bb\u30c3\u30c8\u306b\u3059\u308b\u3068\u3001\u3042\u3068\u304b\u3089\u540c\u3058\u5224\u65ad\u3092\u518d\u73fe\u3067\u304d\u307e\u3059\u3002<\/p><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u4eca\u56de\u306eSQL\u3067\u4e00\u756a\u5927\u4e8b\u306a\u306e\u306f\u3001<code>IN<\/code> \u306e\u9006\u3092\u63a2\u3059\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u78ba\u8a8d\u3057\u305f\u3044ID\u4e00\u89a7\u3092 <code>target_ids<\/code> \u3068\u3057\u3066\u4f5c\u308a\u3001\u305d\u306e\u4e00\u89a7\u3092\u5de6\u5074\u306b\u7f6e\u304f\u3053\u3068\u3067\u3059\u3002 \u305d\u3053\u307e\u3067\u6c7a\u307e\u308c\u3070\u3001<code>LEFT JOIN ... IS NULL<\/code> \u3067\u3082 <code>NOT EXISTS<\/code> \u3067\u3082\u4e0d\u8db3ID\u306f\u51fa\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u696d\u52d9\u306e\u78ba\u8a8d\u3067\u306f\u3001\u307e\u305a\u5168\u4ef6\u5224\u5b9a\u3067 <code>exists<\/code> \u3068 <code>missing<\/code> \u3092\u4e26\u3079\u307e\u3059\u3002 \u554f\u984c\u306a\u3051\u308c\u3070\u3001\u4e0d\u8db3ID\u3060\u3051\u306eSQL\u3092\u5831\u544a\u7528\u306b\u4f7f\u3044\u307e\u3059\u3002 \u3053\u306e\u9806\u756a\u306a\u3089\u3001SQL\u306e\u7d50\u679c\u3092\u898b\u305f\u4eba\u306b\u3082\u3001\u4f55\u304c\u5b58\u5728\u3057\u3066\u4f55\u304c\u5b58\u5728\u3057\u306a\u304b\u3063\u305f\u306e\u304b\u3092\u8aac\u660e\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Excel\u3084\u30e1\u30fc\u30eb\u3067\u3082\u3089\u3063\u305fID\u4e00\u89a7\u3092DB\u306b\u7167\u4f1a\u3057\u305f\u3068\u304d\u3001\u5b58\u5728\u3057\u306a\u304b\u3063\u305fID\u3060\u3051\u3092\u8fd4\u3059SQL\u3092\u3001\u30c0\u30df\u30fc\u8868\u3068\u5b9f\u884c\u7d50\u679c\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":1853,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[242],"tags":[250,251,255,256],"class_list":["post-1848","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql-database","tag-oracle","tag-sql","tag-left-join","tag-not-exists"],"_links":{"self":[{"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/1848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1848"}],"version-history":[{"count":1,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/1848\/revisions"}],"predecessor-version":[{"id":1849,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/1848\/revisions\/1849"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/media\/1853"}],"wp:attachment":[{"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}