{"id":1410,"date":"2019-05-09T18:30:54","date_gmt":"2019-05-09T09:30:54","guid":{"rendered":"http:\/\/idealive.jp\/blog\/?p=1410"},"modified":"2019-05-09T18:30:54","modified_gmt":"2019-05-09T09:30:54","slug":"mysql-sql_mode%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6","status":"publish","type":"post","link":"https:\/\/idealive.jp\/blog\/2019\/05\/09\/mysql-sql_mode%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6\/","title":{"rendered":"MySQL &#8211; sql_mode\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f sohnishi \u3067\u3059\u3002<\/p>\n<p>\u7a81\u7136\u3067\u3059\u304c\u3001\u307f\u306a\u3055\u3093MySQL\u306b\u304a\u3051\u308bsql_mode\u3068\u3044\u3046\u3082\u306e\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u79c1\u306f\u6700\u8fd1\u77e5\u308a\u307e\u3057\u305f\u3002\u3002\u3002<\/p>\n<p>\u666e\u6bb5\u3001sql_mode\u306e\u4e8b\u306a\u3069\u6c17\u306b\u3057\u3066\u958b\u767a\u3057\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3002\u3002<\/p>\n<p>\u3064\u3044\u5148\u65e5\u3001<\/p>\n<p>\u539f\u56e0\u4e0d\u660e\u306e\u30d0\u30b0\u3068\u683c\u95d8\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>PHP\u3067\u306e\u6539\u4fee\u4f5c\u696d\u3092\u884c\u306a\u3063\u3066\u3044\u308b\u3068\u3001\u4e00\u5207\u89e6\u3063\u3066\u3044\u306a\u3044\u7b87\u6240\u3067\u3001<\/p>\n<p><strong><em>Field &#8216;hogehoge&#8217; doesn&#8217;t have a default value<\/em><\/strong><\/p>\n<p>\u304c\u767a\u751f\u3057\u3001\uff1f\uff1f\uff1f\u306a\u72b6\u6cc1\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u30bd\u30fc\u30b9\u306e\u3069\u3053\u3092\u63a2\u3057\u3066\u3082\u3001<em><strong>hogehoge<\/strong><\/em>\u306b\u5024\u3092\u5165\u308c\u3066\u3042\u3052\u3066\u3044\u308b\u7b87\u6240\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u3082\u3057\u304b\u3057\u3066\u672c\u756a\u3067\u3082\u52d5\u3044\u3066\u306a\u3044\u306e\uff1f\u305d\u3093\u306a\u30cf\u30ba\u306a\u3044\u3088\u306a\u301c\u3068\u601d\u3044\u3064\u3064\u683c\u95d8\u3057\u3066\u3044\u308b\u3068\u3001<\/p>\n<p>MySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5dee\u7570\u306b\u3088\u308bsql_mode\u306e\u9055\u3044\u304c\u539f\u56e0\u3067\u3057\u305f\u3002<\/p>\n<p>\u6539\u4fee\u3068\u540c\u6642\u306b\u8af8\u3005\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3092\u884c\u306a\u3063\u3066\u3044\u305f\u305f\u3081\u3001<\/p>\n<p>MySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3082\u305d\u308c\u306b\u5408\u308f\u305b\u3066\u3057\u307e\u3063\u3066\u3044\u305f\u306e\u3067\u3059\u3002<\/p>\n<p>MySQL\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a5.7.23<\/p>\n<blockquote><p>sql_mode\uff1a&#8217;ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION&#8217;<\/p><\/blockquote>\n<p>MySQL\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a5.5.x(\u78ba\u304b)<\/p>\n<blockquote><p>sql_mode\uff1a&#8221;<\/p><\/blockquote>\n<p>\u3053\u306e\u9055\u3044\u3067\u5177\u4f53\u7684\u306b\u3069\u306e\u3088\u3046\u306a\u4e8b\u304c\u8d77\u304d\u308b\u304b\u3068\u3044\u3046\u3068\u3001<\/p>\n<p>\u5f8c\u8005(sql_mode\uff1a&#8221;)\u306f\u3001<\/p>\n<p>INSERT\u6642\u3001Not Null\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5024\u3092\u5165\u308c\u306a\u304f\u3066\u3082INSERT\u3067\u304d\u3061\u3083\u3046\u3093\u3067\u3059\u3002\u3002\u3002<\/p>\n<p>\u3069\u3046\u3084\u3089NOT NULL\u88dc\u5b8c\u3068\u3044\u3046\u3000\u4eca\u306e\u79c1\u306b\u306f\u5b58\u5728\u610f\u7fa9\u304c\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u6a5f\u80fd\u304c\u50cd\u304f\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>INT\u578b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306f\u3001\u52dd\u624b\u306b\u300c0\u300d\u3092\u5165\u308c\u3089\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>VARCHAR\u578b\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u7a7a\u6587\u5b57\u3092\u5165\u308c\u3089\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u4ed6\u306f\u8a66\u3057\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u8a73\u3057\u3044\u65b9\u3001NOT NULL\u88dc\u5b8c\u306e\u5b58\u5728\u610f\u7fa9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f sohnishi \u3067\u3059\u3002 \u7a81\u7136\u3067\u3059\u304c\u3001\u307f\u306a\u3055\u3093MySQL\u306b\u304a\u3051\u308bsql_mode\u3068\u3044\u3046\u3082\u306e\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u304b\u3002 \u79c1\u306f\u6700\u8fd1\u77e5\u308a\u307e\u3057\u305f\u3002\u3002\u3002 \u666e\u6bb5\u3001sql_mode\u306e\u4e8b\u306a\u3069\u6c17\u306b\u3057\u3066\u958b\u767a\u3057\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3002\u3002 &#8230;<a class=\"read-more-link button\" href=\"https:\/\/idealive.jp\/blog\/2019\/05\/09\/mysql-sql_mode%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6\/\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":3,"featured_media":1414,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-1410","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts\/1410"}],"collection":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/comments?post=1410"}],"version-history":[{"count":4,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts\/1410\/revisions"}],"predecessor-version":[{"id":1415,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/posts\/1410\/revisions\/1415"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/media\/1414"}],"wp:attachment":[{"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/media?parent=1410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/categories?post=1410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idealive.jp\/blog\/wp-json\/wp\/v2\/tags?post=1410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}