{"id":3515,"date":"2017-09-27T11:24:16","date_gmt":"2017-09-27T02:24:16","guid":{"rendered":"https:\/\/www.climb.co.jp\/blog_dbmoto\/?p=3515"},"modified":"2023-08-24T09:01:13","modified_gmt":"2023-08-24T00:01:13","slug":"%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%a6sql-server%e3%81%ab%e3%83%87%e3%83%bc%e3%82%bf%e3%83%99%e3%83%bc%e3%82%b9%e3%82%92%e4%bd%9c%e6%88%90%e3%81%99","status":"publish","type":"post","link":"https:\/\/www.climb.co.jp\/blog_dbmoto\/archives\/3515","title":{"rendered":"\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3057\u3066SQL Server\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>SQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u624b\u52d5\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u65b9\u6cd5\u3092\u77e5\u308b\u3053\u3068\u306f\u8cb4\u91cd\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u306b\u5fc5\u8981\u306a\u624b\u9806\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>SQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u624b\u52d5\u3067\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3088\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u3092\u5b9f\u884c\u3057\u3066\u3001\u30d7\u30ed\u30bb\u30b9\u3092\u3088\u308a\u7c21\u5358\u306b\u53cd\u5fa9\u53ef\u80fd\u306b\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u5b9f\u969b\u3001\u5c11\u306a\u304f\u3068\u3082\u4e00\u90e8\u306eMicrosoft\u30b5\u30fc\u30d0\u88fd\u54c1\u3067\u306f\u3001\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u30d7\u30ed\u30bb\u30b9\u306e\u4e00\u74b0\u3068\u3057\u3066\u3053\u306e\u80cc\u5f8c\u306b\u3042\u308b\u3053\u306e\u6280\u8853\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Microsoft\u306ePowerShell\u30b9\u30af\u30ea\u30d7\u30c8\u8a00\u8a9e\u3068\u30a8\u30f3\u30b8\u30f3\u3092\u4f7f\u308f\u306a\u304f\u3066\u3082\u3001SQL Server\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u6210\u3059\u308b\u306e\u306f\u672c\u5f53\u306b\u7c21\u5358\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u56f31\u306b\u3001\u30e1\u30e2\u5e33\u3067\u4f5c\u6210\u3055\u308c\u305fSQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>3\u3064\u306e\u30b3\u30fc\u30c9\u884c\u306e\u3046\u3061\u306e\u6700\u521d\u306e\u884c\u306f\u3001\u73fe\u5728\u4f5c\u6210\u3057\u3066\u3044\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u73fe\u5728\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u8abf\u3079\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306fmaster\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4e0b\u306bDemo\u3068\u3044\u3046\u540d\u524d\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u5206\u304b\u308a\u3084\u3059\u304f\u7c21\u5358\u306a\u3053\u3068\u3082\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u6700\u5f8c\u306e\u30b3\u30fc\u30c9\u884c\u306f\u3001\u3053\u308c\u304c\u547d\u4ee4\u30d6\u30ed\u30c3\u30af\u306e\u7d42\u308f\u308a\u3067\u3042\u308a\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u3079\u304d\u3053\u3068\u3092SQL\u306b\u4f1d\u3048\u307e\u3059\u3002\u30a4\u30e1\u30fc\u30b8\u3092\u898b\u308b\u3068\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u306f.SQL\u304c\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8a8d\u8b58\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.ttgtmedia.com\/rms\/editorial\/sSQLServer_database_creation_fig1_desktop.png\" alt=\"Database named Demo\" \/><\/p>\n<p>\u56f31. \u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001Demo\u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>SQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u3001SQL Server Management Studio(SSMS)\u3092\u958b\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30e1\u30a4\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30eb\u30fc\u30c1\u30f3\u306bSSMS\u3092\u542b\u307e\u306a\u3044SQL Server 2016\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u7d50\u679c\u3001Microsoft\u306eWeb\u30b5\u30a4\u30c8\u304b\u3089SSMS\u3092\u500b\u5225\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.ttgtmedia.com\/rms\/editorial\/sSQLServer_database_creation_fig2_desktop.png\" alt=\"Database within SSMS\" \/><\/p>\n<p>\u56f32. SSMS\u5185\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u884c\u304c\u30c4\u30fc\u30eb\u30d0\u30fc\u306eOpen File\u30a2\u30a4\u30b3\u30f3\u306e\u4e0b\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002\u56f32\u306e\u3088\u3046\u306b\u3001\u30c4\u30fc\u30eb\u30d0\u30fc\u306e\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u304cMaster\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u304cmaster\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3055\u308c\u308b\u3053\u3068\u3092\u793a\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u3001Execute\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u6b63\u5e38\u306b\u5b9f\u884c\u3055\u308c\u305f\u3053\u3068\u3092\u793a\u3059\u56f33\u306e\u4e0b\u90e8\u306b\u3042\u308b\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u307e\u305f\u3001\u30b3\u30f3\u30bd\u30fc\u30eb\u30c4\u30ea\u30fc\u306b\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001Demo\u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u304a\u308a\u3001\u65b0\u3057\u304f\u4f5c\u6210\u3055\u308c\u305fDemo\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8\u5185\u306b\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.ttgtmedia.com\/rms\/editorial\/sSQLServer_database_creation_fig3_desktop.png\" alt=\"Creating Demo database\" \/><\/p>\n<p>\u56f33. \u30c7\u30e2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u3067\u3001\u4f5c\u6210\u3057\u305f\u3070\u304b\u308a\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u5316\u3059\u308b\u65b9\u6cd5\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u4ee5\u4e0b\u306e\u56f34\u306b\u3001\u4f7f\u7528\u3067\u304d\u308b\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30fc\u30c9\u306fMyTable\u3068\u3044\u3046\u540d\u524d\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u5b58\u5728\u3092\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002\u30c6\u30fc\u30d6\u30eb\u304c\u307e\u3060\u5b58\u5728\u3057\u306a\u3044\u5834\u5408\u306f\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u65b0\u3057\u3044\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u3001Id\u3068\u3044\u3046\u540d\u524d\u306e\u4e3b\u30ad\u30fc\u3068\u3001\u5225\u306e\u540d\u524d\u3068\u5024\u306e\u5217\u306e3\u3064\u306e\u5217\u304c\u542b\u307e\u308c\u307e\u3059\u3002\u5217\u306e\u5b9a\u7fa9\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u30b3\u30f3\u30de\u3067\u533a\u5207\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.ttgtmedia.com\/rms\/editorial\/sSQLServer_database_creation_fig4_desktop.png\" alt=\"MyTable database\" \/><\/p>\n<p>\u56f34. \u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001MyTable\u3068\u3044\u3046\u540d\u524d\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u79c1\u305f\u3061\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u540c\u3058\u30c6\u30af\u30cb\u30c3\u30af\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u304c\u3001\u4e3b\u306a\u9055\u3044\u304c1\u3064\u3042\u308a\u307e\u3059\u3002\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u30de\u30b9\u30bf\u30fc\u3092\u9078\u629e\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001\u30c7\u30e2\u3092\u9078\u629e\u3057\u3066\u3067\u3082\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u5185\u306b\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u56f35\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.ttgtmedia.com\/rms\/editorial\/sSQLServer_database_creation_fig5_desktop.png\" alt=\"Script against Demo\" \/><\/p>\n<p>\u56f35. \u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30c7\u30e2\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u884c\u3055\u308c\u308b\u3068\u3001\u65b0\u3057\u3044\u30c6\u30fc\u30d6\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u65b0\u3057\u3044\u30c6\u30fc\u30d6\u30eb\u304c\u8868\u793a\u3055\u308c\u308b\u524d\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3001Refresh\u30b3\u30de\u30f3\u30c9\u3092\u9078\u629e\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u66f4\u65b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u56f36\u306f\u3001\u65b0\u3057\u3044\u8868\u3068\u305d\u306e\u5217\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/cdn.ttgtmedia.com\/rms\/editorial\/sSQLServer_database_creation_fig6_desktop.png\" alt=\"New database table\" \/><\/p>\n<p>\u56f36. \u30b9\u30af\u30ea\u30d7\u30c8\u306f\u30013\u3064\u306e\u5217\u3092\u6301\u3064\u65b0\u3057\u3044\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3059\u3079\u3066\u306e\u6b63\u76f4\u306a\u3068\u3053\u308d\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u305d\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u624b\u52d5\u3067\u4f5c\u6210\u3059\u308b\u307b\u3046\u304c\u65e9\u3044\u3067\u3057\u3087\u3046\u3002\u305f\u3060\u3057\u3001SQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30c6\u30fc\u30d6\u30eb1\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30c6\u30fc\u30d6\u30eb\u306e\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001\u4e00\u8cab\u3057\u305f\u65b9\u6cd5\u3067\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u624b\u52d5\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u304c\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u65b9\u6cd5\u3092\u77e5\u308b\u3053\u3068\u306f\u8cb4\u91cd\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u4f5c\u6210\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u306b\u5fc5\u8981\u306a\u624b\u9806\u3092\u793a\u3057\u307e\u3059\u3002 SQL Server\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f &hellip; <a href=\"https:\/\/www.climb.co.jp\/blog_dbmoto\/archives\/3515\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[191,205],"tags":[16,85,204],"class_list":["post-3515","post","type-post","status-publish","format-standard","hentry","category-database","category-sql-server","tag-sql-server","tag-85","tag-dbmoto"],"_links":{"self":[{"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/posts\/3515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/comments?post=3515"}],"version-history":[{"count":4,"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/posts\/3515\/revisions"}],"predecessor-version":[{"id":6837,"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/posts\/3515\/revisions\/6837"}],"wp:attachment":[{"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/media?parent=3515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/categories?post=3515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.climb.co.jp\/blog_dbmoto\/wp-json\/wp\/v2\/tags?post=3515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}