{"id":1614,"date":"2026-06-03T09:00:00","date_gmt":"2026-06-03T00:00:00","guid":{"rendered":"https:\/\/blog.nexive.tech\/?p=1614"},"modified":"2026-06-03T14:51:43","modified_gmt":"2026-06-03T05:51:43","slug":"legacy-db-table-name-investigation","status":"publish","type":"post","link":"https:\/\/blog.nexive.tech\/?p=1614","title":{"rendered":"\u30ec\u30ac\u30b7\u30fcDB\u306e\u5206\u304b\u308a\u306b\u304f\u3044\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u8abf\u67fb\u3059\u308b\u3068\u304d\u306b\u6c17\u3092\u4ed8\u3051\u305f\u3044\u3053\u3068"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u53e4\u3044\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3092\u5f15\u304d\u7d99\u3050\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u898b\u305f\u3060\u3051\u3067\u306f\u7528\u9014\u304c\u5206\u304b\u3089\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<code>T_MST01<\/code>\u3001<code>wk_data<\/code>\u3001<code>JUCHU_H<\/code> \u306e\u3088\u3046\u306a\u540d\u524d\u304c\u4e26\u3093\u3067\u3044\u3066\u3001\u3069\u306e\u753b\u9762\u3084\u5e33\u7968\u306b\u95a2\u4fc2\u3059\u308b\u306e\u304b\u3001\u4eca\u3082\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u304b\u5224\u65ad\u3067\u304d\u306a\u3044\u3002\u305d\u3093\u306a\u72b6\u614b\u3067\u4fee\u6b63\u3084\u79fb\u884c\u3092\u9032\u3081\u308b\u306e\u306f\u5371\u967a\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5927\u5207\u306a\u306e\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u304b\u3089\u610f\u5473\u3092\u5f53\u3066\u306b\u3044\u304f\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u540d\u524d\u3001\u30ab\u30e9\u30e0\u3001\u5236\u7d04\u3001\u30c7\u30fc\u30bf\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u306e\u5229\u7528\u7b87\u6240\u3092\u9806\u306b\u898b\u3066\u3001\u6839\u62e0\u3092\u7a4d\u307f\u4e0a\u3052\u308b\u3053\u3068<\/strong>\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30ec\u30ac\u30b7\u30fcDB\u306e\u5206\u304b\u308a\u306b\u304f\u3044\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u8abf\u67fb\u3059\u308b\u3068\u304d\u306e\u521d\u52d5\u624b\u9806\u3092\u6574\u7406\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u521d\u306b\u6c7a\u3081\u308b\u306e\u306f\u300c\u4f55\u3092\u89e6\u308b\u304b\u300d\u3067\u306f\u306a\u304f\u300c\u4f55\u3092\u78ba\u8a8d\u3059\u308b\u304b\u300d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30c6\u30fc\u30d6\u30eb\u540d\u304c\u5206\u304b\u3089\u306a\u3044\u3068\u304d\u307b\u3069\u3001\u5148\u306bSQL\u3092\u5b9f\u884c\u3057\u3066\u4e2d\u8eab\u3092\u898b\u305f\u304f\u306a\u308a\u307e\u3059\u3002\u305f\u3060\u3001\u6700\u521d\u306b\u6c7a\u3081\u308b\u3079\u304d\u306a\u306e\u306f\u300c\u3053\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u4fee\u6b63\u3059\u308b\u304b\u300d\u3067\u306f\u306a\u304f\u3001\u300c<strong>\u4f55\u3092\u78ba\u8a8d\u3059\u308c\u3070\u7528\u9014\u3092\u8aac\u660e\u3067\u304d\u308b\u304b<\/strong>\u300d\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u307e\u305a\u306f\u8abf\u67fb\u3092\u8aad\u307f\u53d6\u308a\u5c02\u7528\u306b\u9650\u5b9a\u3057\u307e\u3059\u3002\u53ef\u80fd\u3067\u3042\u308c\u3070\u672c\u756aDB\u3067\u306f\u306a\u304f\u3001\u691c\u8a3c\u74b0\u5883\u3084\u53c2\u7167\u7528DB\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002\u672c\u756aDB\u3092\u898b\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u3082\u3001\u66f4\u65b0\u7cfbSQL\u3092\u5b9f\u884c\u3057\u306a\u3044\u6a29\u9650\u3067\u5165\u308b\u306e\u304c\u57fa\u672c\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u521d\u306e\u30e1\u30e2\u306b\u306f\u3001\u6b21\u306e3\u3064\u3060\u3051\u3067\u3082\u66f8\u3044\u3066\u304a\u304f\u3068\u8abf\u67fb\u304c\u3076\u308c\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8abf\u3079\u305f\u3044\u30c6\u30fc\u30d6\u30eb\u540d<\/li>\n\n\n\n<li>\u8abf\u67fb\u306e\u76ee\u7684<\/li>\n\n\n\n<li>\u3044\u307e\u5206\u304b\u3063\u3066\u3044\u308b\u4eee\u8aac<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3068\u3048\u3070\u300c<code>wk_sales_tmp<\/code> \u306f\u58f2\u4e0a\u96c6\u8a08\u306e\u4e00\u6642\u30c6\u30fc\u30d6\u30eb\u3089\u3057\u3044\u300d\u7a0b\u5ea6\u306e\u4eee\u8aac\u3067\u69cb\u3044\u307e\u305b\u3093\u3002\u91cd\u8981\u306a\u306e\u306f\u3001\u4eee\u8aac\u3092\u4e8b\u5b9f\u3068\u3057\u3066\u6271\u308f\u306a\u3044\u3053\u3068\u3067\u3059\u3002\u4ee5\u964d\u306e\u624b\u9806\u3067\u306f\u3001\u3053\u306e\u4eee\u8aac\u3092\u652f\u3048\u308b\u6839\u62e0\u3001\u307e\u305f\u306f\u5426\u5b9a\u3059\u308b\u6839\u62e0\u3092\u96c6\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u30c6\u30fc\u30d6\u30eb\u540d\u3060\u3051\u3067\u7528\u9014\u3092\u65ad\u5b9a\u3057\u306a\u3044\u3053\u3068\u304c\u5927\u4e8b\u3067\u3059\u3002\u30ec\u30ac\u30b7\u30fcDB\u3067\u306f\u3001\u540d\u524d\u3068\u5b9f\u614b\u304c\u305a\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u591a\u3005\u3042\u308a\u307e\u3059\uff08\u7d4c\u9a13\u8ac7\uff09\u3002<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e1\u30bf\u30c7\u30fc\u30bf\u304b\u3089\u30c6\u30fc\u30d6\u30eb\u306e\u8f2a\u90ed\u3092\u3064\u304b\u3080<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u898b\u308b\u306e\u306f\u30c6\u30fc\u30d6\u30eb\u306e\u4e2d\u8eab\u305d\u306e\u3082\u306e\u3067\u306f\u306a\u304f\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e1\u30bf\u30c7\u30fc\u30bf\u3068\u306f\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u3001\u30ab\u30e9\u30e0\u540d\u3001\u30c7\u30fc\u30bf\u578b\u3001NULL\u53ef\u5426\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3001\u5236\u7d04\u3001\u30b3\u30e1\u30f3\u30c8\u306a\u3069\u3001\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u8aac\u660e\u3059\u308b\u60c5\u5831\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ab\u30e9\u30e0\u540d\u3092\u898b\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u3088\u308a\u3082\u696d\u52d9\u306e\u624b\u304c\u304b\u308a\u304c\u591a\u304f\u898b\u3064\u304b\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070 <code>customer_id<\/code>\u3001<code>order_no<\/code>\u3001<code>billing_month<\/code>\u3001<code>deleted_flg<\/code> \u306e\u3088\u3046\u306a\u5217\u304c\u3042\u308c\u3070\u3001\u9867\u5ba2\u3001\u53d7\u6ce8\u3001\u8acb\u6c42\u3001\u8ad6\u7406\u524a\u9664\u3068\u3044\u3063\u305f\u7528\u9014\u3092\u63a8\u6e2c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3042\u308f\u305b\u3066\u898b\u308b\u3079\u304d\u306a\u306e\u306f\u3001\u4e3b\u30ad\u30fc\u3001\u30e6\u30cb\u30fc\u30af\u5236\u7d04\u3001\u5916\u90e8\u30ad\u30fc\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3067\u3059\u3002\u5916\u90e8\u30ad\u30fc\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308c\u3070\u95a2\u9023\u30c6\u30fc\u30d6\u30eb\u3092\u8ffd\u3044\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002\u5916\u90e8\u30ad\u30fc\u304c\u306a\u3044\u5834\u5408\u3067\u3082\u3001\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u540d\u3084\u540c\u3058\u30ab\u30e9\u30e0\u540d\u304b\u3089\u95a2\u9023\u5019\u88dc\u3092\u63a2\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6700\u4f4e\u9650\u898b\u308bSQL\u306e\u4f8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u591a\u304f\u306eDB\u3067\u306f\u3001<code>INFORMATION_SCHEMA<\/code> \u3084\u30b7\u30b9\u30c6\u30e0\u30ab\u30bf\u30ed\u30b0\u304b\u3089\u30c6\u30fc\u30d6\u30eb\u5b9a\u7fa9\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\u5b9f\u969b\u306eSQL\u306fDB\u88fd\u54c1\u3084\u6a29\u9650\u306b\u3088\u3063\u3066\u5909\u308f\u308a\u307e\u3059\u304c\u3001\u6700\u521d\u306f\u6b21\u306e\u3088\u3046\u306a\u89b3\u70b9\u3067\u78ba\u8a8d\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>SELECT\n  table_schema,\n  table_name,\n  column_name,\n  data_type,\n  is_nullable,\n  column_default\nFROM information_schema.columns\nWHERE table_name = '\u8abf\u67fb\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u540d'\nORDER BY ordinal_position;<\/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\">  table_schema,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  table_name,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  column_name,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  data_type,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  is_nullable,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  column_default<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> information_schema.columns<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">WHERE<\/span><span style=\"color: #D8DEE9FF\"> table_name <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">\u8abf\u67fb\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u540d<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">ORDER BY<\/span><span style=\"color: #D8DEE9FF\"> ordinal_position;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">SQL Server\u3067\u5916\u90e8\u30ad\u30fc\u306e\u95a2\u4fc2\u3092\u898b\u308b\u5834\u5408\u306f\u3001<code>sys.foreign_key_columns<\/code> \u306a\u3069\u306e\u30ab\u30bf\u30ed\u30b0\u30d3\u30e5\u30fc\u304c\u624b\u304c\u304b\u308a\u306b\u306a\u308a\u307e\u3059\u3002\u5916\u90e8\u30ad\u30fc\u304c\u6b63\u3057\u304f\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308bDB\u306a\u3089\u3001\u3069\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u3069\u306e\u5217\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u304b\u3092\u78ba\u8a8d\u3067\u304d\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>SELECT\n  fk.name AS foreign_key_name,\n  parent_table.name AS parent_table,\n  parent_column.name AS parent_column,\n  referenced_table.name AS referenced_table,\n  referenced_column.name AS referenced_column\nFROM sys.foreign_key_columns fkc\nJOIN sys.foreign_keys fk\n  ON fkc.constraint_object_id = fk.object_id\nJOIN sys.tables parent_table\n  ON fkc.parent_object_id = parent_table.object_id\nJOIN sys.columns parent_column\n  ON fkc.parent_object_id = parent_column.object_id\n AND fkc.parent_column_id = parent_column.column_id\nJOIN sys.tables referenced_table\n  ON fkc.referenced_object_id = referenced_table.object_id\nJOIN sys.columns referenced_column\n  ON fkc.referenced_object_id = referenced_column.object_id\n AND fkc.referenced_column_id = referenced_column.column_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\">  fk.name <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> foreign_key_name,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  parent_table.name <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> parent_table,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  parent_column.name <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> parent_column,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  referenced_table.name <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> referenced_table,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  referenced_column.name <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> referenced_column<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> sys.foreign_key_columns fkc<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">JOIN<\/span><span style=\"color: #D8DEE9FF\"> sys.foreign_keys fk<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> fkc.constraint_object_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> fk.object_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">JOIN<\/span><span style=\"color: #D8DEE9FF\"> sys.tables parent_table<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> fkc.parent_object_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> parent_table.object_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">JOIN<\/span><span style=\"color: #D8DEE9FF\"> sys.columns parent_column<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> fkc.parent_object_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> parent_column.object_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">AND<\/span><span style=\"color: #D8DEE9FF\"> fkc.parent_column_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> parent_column.column_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">JOIN<\/span><span style=\"color: #D8DEE9FF\"> sys.tables referenced_table<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> fkc.referenced_object_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> referenced_table.object_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">JOIN<\/span><span style=\"color: #D8DEE9FF\"> sys.columns referenced_column<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #81A1C1\">ON<\/span><span style=\"color: #D8DEE9FF\"> fkc.referenced_object_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> referenced_column.object_id<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">AND<\/span><span style=\"color: #D8DEE9FF\"> fkc.referenced_column_id <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> referenced_column.column_id;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u306e\u76ee\u7684\u306f\u3001\u5b8c\u74a7\u306aER\u56f3\u3092\u4f5c\u308b\u3053\u3068\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u304c\u300c\u30de\u30b9\u30bf\u306a\u306e\u304b\u300d\u300c\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u306a\u306e\u304b\u300d\u300c\u4e00\u6642\u4f5c\u696d\u7528\u306a\u306e\u304b\u300d\u300c\u9023\u643a\u7528\u306a\u306e\u304b\u300d\u3092\u7d5e\u308b\u3053\u3068\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u95a2\u9023\u30c6\u30fc\u30d6\u30eb\u3068\u30c7\u30fc\u30bf\u306e\u52d5\u304d\u304b\u3089\u7528\u9014\u3092\u7d5e\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e1\u30bf\u30c7\u30fc\u30bf\u3067\u8f2a\u90ed\u304c\u898b\u3048\u305f\u3089\u3001\u6b21\u306f\u95a2\u9023\u30c6\u30fc\u30d6\u30eb\u3092\u63a2\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ec\u30ac\u30b7\u30fcDB\u3067\u306f\u5916\u90e8\u30ad\u30fc\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u306a\u3044\u3053\u3068\u3082\u73cd\u3057\u304f\u3042\u308a\u307e\u305b\u3093\u3002\u305d\u306e\u5834\u5408\u306f\u3001\u540c\u3058\u30ab\u30e9\u30e0\u540d\u3001\u4f3c\u305f\u63a5\u982d\u8f9e\u3001ID\u5217\u3001\u65e5\u4ed8\u5217\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u5217\u3092\u624b\u304c\u304b\u308a\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3068\u3048\u3070 <code>customer_id<\/code> \u3092\u6301\u3064\u30c6\u30fc\u30d6\u30eb\u304c\u8907\u6570\u3042\u308b\u306a\u3089\u3001\u9867\u5ba2\u30de\u30b9\u30bf\u3001\u53d7\u6ce8\u3001\u8acb\u6c42\u3001\u554f\u3044\u5408\u308f\u305b\u5c65\u6b74\u306a\u3069\u306b\u3064\u306a\u304c\u3063\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<code>order_no<\/code> \u3084 <code>slip_no<\/code> \u306e\u3088\u3046\u306a\u756a\u53f7\u5217\u304c\u3042\u308c\u3070\u3001\u30d8\u30c3\u30c0\u30c6\u30fc\u30d6\u30eb\u3068\u660e\u7d30\u30c6\u30fc\u30d6\u30eb\u306e\u95a2\u4fc2\u3092\u7591\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9f\u30c7\u30fc\u30bf\u3092\u898b\u308b\u3068\u304d\u306f\u3001\u307e\u305a\u4ef6\u6570\u3001\u6700\u65b0\u66f4\u65b0\u65e5\u3001\u4ee3\u8868\u7684\u306a\u5024\u306e\u5206\u5e03\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3044\u304d\u306a\u308a\u5168\u4ef6\u3092\u53d6\u5f97\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u4ef6\u6570\u3084\u65e5\u4ed8\u7bc4\u56f2\u3092\u898b\u3066\u304b\u3089\u30b5\u30f3\u30d7\u30eb\u3092\u7d5e\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 COUNT(*) FROM target_table;\n\nSELECT\n  MIN(updated_at) AS first_updated_at,\n  MAX(updated_at) AS last_updated_at\nFROM target_table;<\/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 style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">COUNT<\/span><span style=\"color: #D8DEE9FF\">(<\/span><span style=\"color: #81A1C1\">*<\/span><span style=\"color: #D8DEE9FF\">) <\/span><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> target_table;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">SELECT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #88C0D0\">MIN<\/span><span style=\"color: #D8DEE9FF\">(updated_at) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> first_updated_at,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">  <\/span><span style=\"color: #88C0D0\">MAX<\/span><span style=\"color: #D8DEE9FF\">(updated_at) <\/span><span style=\"color: #81A1C1\">AS<\/span><span style=\"color: #D8DEE9FF\"> last_updated_at<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">FROM<\/span><span style=\"color: #D8DEE9FF\"> target_table;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u305f\u3060\u3057\u3001\u4ef6\u6570\u304c\u5c11\u306a\u3044\u304b\u3089\u4e0d\u8981\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002\u5e74\u6b21\u51e6\u7406\u3060\u3051\u3067\u4f7f\u3046\u30c6\u30fc\u30d6\u30eb\u3001\u969c\u5bb3\u6642\u3060\u3051\u4f7f\u3046\u9000\u907f\u30c6\u30fc\u30d6\u30eb\u3001\u5916\u90e8\u9023\u643a\u306e\u5c65\u6b74\u30c6\u30fc\u30d6\u30eb\u306a\u3069\u3001\u666e\u6bb5\u306f\u52d5\u304d\u304c\u5c11\u306a\u3044\u91cd\u8981\u30c6\u30fc\u30d6\u30eb\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u898b\u308b\u3079\u304d\u306a\u306e\u306f\u3001\u4ef6\u6570\u305d\u306e\u3082\u306e\u3088\u308a\u300c<strong>\u3069\u306e\u696d\u52d9\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u5897\u6e1b\u3059\u308b\u304b<\/strong>\u300d\u3067\u3059\u3002\u65e5\u6b21\u30d0\u30c3\u30c1\u306e\u5f8c\u306b\u5897\u3048\u308b\u306e\u304b\u3001\u753b\u9762\u767b\u9332\u3067\u5897\u3048\u308b\u306e\u304b\u3001\u6708\u672b\u3060\u3051\u66f4\u65b0\u3055\u308c\u308b\u306e\u304b\u3002\u30c7\u30fc\u30bf\u306e\u52d5\u304d\u304c\u5206\u304b\u308b\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u3088\u308a\u3082\u7528\u9014\u306b\u8fd1\u3065\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u306e\u53c2\u7167\u7b87\u6240\u3092\u5fc5\u305a\u898b\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">DB\u3060\u3051\u3092\u898b\u3066\u3082\u3001\u73fe\u884c\u30b7\u30b9\u30c6\u30e0\u3067\u3069\u3046\u4f7f\u308f\u308c\u3066\u3044\u308b\u304b\u307e\u3067\u306f\u5206\u304b\u3089\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u306b\u30ec\u30ac\u30b7\u30fc\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001DB\u4e0a\u306b\u5916\u90e8\u30ad\u30fc\u304c\u306a\u304f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u306eSQL\u3060\u3051\u3067\u95a2\u4fc2\u304c\u4f5c\u3089\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u305d\u306e\u305f\u3081\u3001\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb\u540d\u3067\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u5168\u4f53\u3092\u691c\u7d22\u3057\u307e\u3059\u3002SQL\u30d5\u30a1\u30a4\u30eb\u3001DAO\u3001Repository\u3001Mapper\u3001ORM\u306e\u30e2\u30c7\u30eb\u5b9a\u7fa9\u3001\u30d0\u30c3\u30c1\u3001\u5e33\u7968\u51fa\u529b\u3001CSV\u9023\u643a\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u30c6\u30fc\u30d6\u30eb\u540d\u304c\u76f4\u63a5\u51fa\u3066\u3053\u306a\u3044\u5834\u5408\u306f\u3001\u30ab\u30e9\u30e0\u540d\u3084\u753b\u9762\u9805\u76ee\u540d\u3067\u3082\u691c\u7d22\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u898b\u308b\u30dd\u30a4\u30f3\u30c8\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SELECT\u3060\u3051\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u304b\u3001INSERT\/UPDATE\/DELETE\u3082\u3042\u308b\u304b<\/li>\n\n\n\n<li>\u3069\u306e\u753b\u9762\u3001API\u3001\u30d0\u30c3\u30c1\u3001\u5e33\u7968\u304b\u3089\u547c\u3070\u308c\u3066\u3044\u308b\u304b<\/li>\n\n\n\n<li>JOIN\u3057\u3066\u3044\u308b\u76f8\u624b\u306e\u30c6\u30fc\u30d6\u30eb\u306f\u4f55\u304b<\/li>\n\n\n\n<li>WHERE\u53e5\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u6761\u4ef6\u306f\u4f55\u304b<\/li>\n\n\n\n<li>\u66f4\u65b0\u30bf\u30a4\u30df\u30f3\u30b0\u304c\u696d\u52d9\u30a4\u30d9\u30f3\u30c8\u3068\u4e00\u81f4\u3059\u308b\u304b<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u53c2\u7167\u7b87\u6240\u304c\u898b\u3064\u304b\u308c\u3070\u3001\u30c6\u30fc\u30d6\u30eb\u306e\u7528\u9014\u306f\u304b\u306a\u308a\u7d5e\u308c\u307e\u3059\u3002\u9006\u306b\u3001DB\u306b\u306f\u5b58\u5728\u3059\u308b\u306e\u306b\u30a2\u30d7\u30ea\u5074\u53c2\u7167\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u5834\u5408\u306f\u3001\u5916\u90e8\u30c4\u30fc\u30eb\u3001\u624b\u52d5\u904b\u7528\u3001\u53e4\u3044\u9023\u643a\u3001\u524a\u9664\u6f0f\u308c\u306e\u53ef\u80fd\u6027\u3092\u5206\u3051\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u300c\u53c2\u7167\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u304b\u3089\u672a\u4f7f\u7528\u300d\u3068\u3059\u3050\u306b\u6c7a\u3081\u308b\u306e\u306f\u5371\u967a\u3067\u3059\u3002\u30b8\u30e7\u30d6\u7ba1\u7406\u30c4\u30fc\u30eb\u3001BI\u30c4\u30fc\u30eb\u3001\u5225\u30ea\u30dd\u30b8\u30c8\u30ea\u3001\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u3001DB\u30ea\u30f3\u30af\u306a\u3069\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5916\u304b\u3089\u4f7f\u308f\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8abf\u67fb\u30e1\u30e2\u306f\u300c\u5206\u304b\u3063\u305f\u3053\u3068\u300d\u3068\u300c\u672a\u78ba\u8a8d\u300d\u3092\u5206\u3051\u3066\u6b8b\u3059<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8abf\u67fb\u7d50\u679c\u306f\u3001\u3042\u3068\u304b\u3089\u898b\u305f\u4eba\u304c\u540c\u3058\u5224\u65ad\u3092\u518d\u73fe\u3067\u304d\u308b\u5f62\u3067\u6b8b\u3057\u307e\u3059\u3002\u5358\u306b\u300c\u58f2\u4e0a\u95a2\u9023\u3063\u307d\u3044\u300d\u3068\u66f8\u304f\u306e\u3067\u306f\u306a\u304f\u3001\u306a\u305c\u305d\u3046\u8003\u3048\u305f\u306e\u304b\u3092\u6839\u62e0\u4ed8\u304d\u3067\u66f8\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7279\u306b\u91cd\u8981\u306a\u306e\u306f\u3001<strong>\u5206\u304b\u3063\u305f\u5185\u5bb9\u3068\u672a\u78ba\u8a8d\u306e\u3053\u3068\u3092\u5206\u3051\u308b\u3053\u3068<\/strong>\u3067\u3059\u3002\u30ec\u30ac\u30b7\u30fcDB\u8abf\u67fb\u3067\u306f\u3001\u3059\u3079\u3066\u3092\u4e00\u5ea6\u306b\u78ba\u5b9a\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u3068\u304d\u306b\u672a\u78ba\u8a8d\u70b9\u3092\u66d6\u6627\u306b\u3057\u305f\u307e\u307e\u4fee\u6b63\u3078\u9032\u3080\u3068\u3001\u5f8c\u3067\u5f71\u97ff\u6f0f\u308c\u304c\u8d77\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8abf\u67fb\u30e1\u30e2\u306e\u66f8\u304d\u65b9\u4f8b<\/h3>\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\">Plaintext<\/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>\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb:\n  wk_sales_tmp\n\n\u8abf\u67fb\u76ee\u7684:\n  \u6708\u6b21\u58f2\u4e0a\u96c6\u8a08\u51e6\u7406\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\n\n\u5206\u304b\u3063\u305f\u3053\u3068:\n  - sales_id, customer_id, billing_month \u3092\u6301\u3064\n  - \u6708\u6b21\u30d0\u30c3\u30c1\u306e SQL \u304b\u3089 INSERT\/DELETE \u3055\u308c\u3066\u3044\u308b\n  - \u753b\u9762\u304b\u3089\u306e\u76f4\u63a5\u53c2\u7167\u306f\u898b\u3064\u304b\u3063\u3066\u3044\u306a\u3044\n\n\u6839\u62e0:\n  - information_schema.columns \u306e\u78ba\u8a8d\u7d50\u679c\n  - batch\/monthly_sales.sql \u306e\u53c2\u7167\n  - \u66f4\u65b0\u65e5\u6642\u304c\u6708\u672b\u51e6\u7406\u6642\u9593\u5e2f\u306b\u96c6\u4e2d\n\n\u672a\u78ba\u8a8d:\n  - BI\u30c4\u30fc\u30eb\u3084\u624b\u52d5SQL\u304b\u3089\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u304b\n  - \u53e4\u3044\u5e33\u7968\u51e6\u7406\u3067\u4f7f\u308f\u308c\u3066\u3044\u306a\u3044\u304b\n\n\u6b21\u306e\u78ba\u8a8d:\n  - \u30b8\u30e7\u30d6\u5b9a\u7fa9\u3068\u5e33\u7968\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u691c\u7d22\u3059\u308b<\/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\">\u5bfe\u8c61\u30c6\u30fc\u30d6\u30eb:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  wk_sales_tmp<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">\u8abf\u67fb\u76ee\u7684:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  \u6708\u6b21\u58f2\u4e0a\u96c6\u8a08\u51e6\u7406\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">\u5206\u304b\u3063\u305f\u3053\u3068:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - sales_id, customer_id, billing_month \u3092\u6301\u3064<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - \u6708\u6b21\u30d0\u30c3\u30c1\u306e SQL \u304b\u3089 INSERT\/DELETE \u3055\u308c\u3066\u3044\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - \u753b\u9762\u304b\u3089\u306e\u76f4\u63a5\u53c2\u7167\u306f\u898b\u3064\u304b\u3063\u3066\u3044\u306a\u3044<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">\u6839\u62e0:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - information_schema.columns \u306e\u78ba\u8a8d\u7d50\u679c<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - batch\/monthly_sales.sql \u306e\u53c2\u7167<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - \u66f4\u65b0\u65e5\u6642\u304c\u6708\u672b\u51e6\u7406\u6642\u9593\u5e2f\u306b\u96c6\u4e2d<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">\u672a\u78ba\u8a8d:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - BI\u30c4\u30fc\u30eb\u3084\u624b\u52d5SQL\u304b\u3089\u53c2\u7167\u3055\u308c\u3066\u3044\u308b\u304b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - \u53e4\u3044\u5e33\u7968\u51e6\u7406\u3067\u4f7f\u308f\u308c\u3066\u3044\u306a\u3044\u304b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">\u6b21\u306e\u78ba\u8a8d:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #d8dee9ff\">  - \u30b8\u30e7\u30d6\u5b9a\u7fa9\u3068\u5e33\u7968\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u691c\u7d22\u3059\u308b<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u3088\u3046\u306b\u66f8\u3044\u3066\u304a\u304f\u3068\u3001\u30ec\u30d3\u30e5\u30fc\u3059\u308b\u4eba\u3082\u300c\u3069\u3053\u307e\u3067\u5206\u304b\u3063\u3066\u3044\u3066\u3001\u3069\u3053\u304b\u3089\u5148\u304c\u4eee\u8aac\u306a\u306e\u304b\u300d\u3092\u5224\u65ad\u3067\u304d\u307e\u3059\u3002\u30c6\u30fc\u30d6\u30eb\u540d\u306e\u610f\u5473\u3092\u5f53\u3066\u308b\u3088\u308a\u3001\u5224\u65ad\u306e\u6839\u62e0\u3092\u6b8b\u3059\u307b\u3046\u304c\u5b9f\u52d9\u3067\u306f\u5f79\u306b\u7acb\u3061\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ec\u30ac\u30b7\u30fcDB\u306e\u30c6\u30fc\u30d6\u30eb\u540d\u304c\u5206\u304b\u308a\u306b\u304f\u3044\u3068\u304d\u306f\u3001\u540d\u524d\u3060\u3051\u3067\u7528\u9014\u3092\u6c7a\u3081\u306a\u3044\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u307e\u305a\u8aad\u307f\u53d6\u308a\u5c02\u7528\u3067\u5b89\u5168\u306b\u5165\u308a\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3001\u95a2\u9023\u30c6\u30fc\u30d6\u30eb\u3001\u5b9f\u30c7\u30fc\u30bf\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5074\u306e\u53c2\u7167\u7b87\u6240\u3092\u9806\u306b\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5916\u90e8\u30ad\u30fc\u304c\u306a\u3044\u3001\u30b3\u30e1\u30f3\u30c8\u304c\u306a\u3044\u3001\u4ed5\u69d8\u66f8\u304c\u53e4\u3044\u3068\u3044\u3046\u72b6\u6cc1\u3067\u3082\u3001\u6839\u62e0\u3092\u7a4d\u307f\u4e0a\u3052\u308c\u3070\u7528\u9014\u306f\u5c11\u3057\u305a\u3064\u7d5e\u308c\u307e\u3059\u3002\u53cd\u5bfe\u306b\u3001\u6839\u62e0\u304c\u8db3\u308a\u306a\u3044\u90e8\u5206\u306f\u672a\u78ba\u8a8d\u3068\u3057\u3066\u6b8b\u3059\u3079\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b21\u306b\u540c\u3058DB\u3092\u898b\u308b\u4eba\u306e\u305f\u3081\u306b\u3082\u3001\u8abf\u67fb\u30e1\u30e2\u306b\u306f\u300c\u5206\u304b\u3063\u305f\u3053\u3068\u300d\u300c\u6839\u62e0\u300d\u300c\u672a\u78ba\u8a8d\u300d\u300c\u6b21\u306e\u78ba\u8a8d\u300d\u3092\u5206\u3051\u3066\u6b8b\u3057\u3066\u304a\u304f\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\u5206\u304b\u3089\u306a\u3044\u307e\u307e\u66f4\u65b0\u4f5c\u696d\u306b\u9032\u307e\u306a\u3044\u3053\u3068\u304c\u3001\u30ec\u30ac\u30b7\u30fcDB\u5bfe\u5fdc\u3067\u4e00\u756a\u5927\u4e8b\u306a\u5b89\u5168\u7b56\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53e4\u3044\u696d\u52d9\u30b7\u30b9\u30c6\u30e0\u3092\u5f15\u304d\u7d99\u3050\u3068\u3001\u30c6\u30fc\u30d6\u30eb\u540d\u3092\u898b\u305f\u3060\u3051\u3067\u306f\u7528\u9014\u304c\u5206\u304b\u3089\u306a\u3044\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 T MST01 \u3001 wk data \u3001 JUCHU H \u306e\u3088\u3046\u306a\u540d\u524d\u304c\u4e26\u3093\u3067\u3044\u3066\u3001\u3069\u306e\u753b\u9762\u3084\u5e33\u7968\u306b\u95a2\u4fc2\u3059\u308b\u306e\u304b\u3001\u4eca\u3082\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u304b\u5224\u65ad\u3067\u304d\u306a\u3044\u3002\u305d\u3093\u306a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":1616,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[117],"tags":[82,131,168,169,170],"class_list":["post-1614","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-legacy","tag-pickup","tag-131","tag-168","tag-sql","tag-170"],"_links":{"self":[{"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/1614","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=1614"}],"version-history":[{"count":1,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/1614\/revisions"}],"predecessor-version":[{"id":1617,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/1614\/revisions\/1617"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=\/wp\/v2\/media\/1616"}],"wp:attachment":[{"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}