{"id":62103,"date":"2024-10-13T16:12:16","date_gmt":"2024-10-13T08:12:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/62103\/"},"modified":"2024-10-13T16:12:17","modified_gmt":"2024-10-13T08:12:17","slug":"java%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e5%92%8cmysql%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e5%b0%8d%e6%87%89%e4%b8%80%e8%a6%bd","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/62103\/","title":{"rendered":"Java\u6578\u64da\u985e\u578b\u548cMySql\u6578\u64da\u985e\u578b\u5c0d\u61c9\u4e00\u89bd"},"content":{"rendered":"<h1 id=\"java%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e5%92%8cmysql%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e5%b0%8d%e6%87%89%e4%b8%80%e8%a6%bd-vUAzTubtNa\">Java\u6578\u64da\u985e\u578b\u548cMySQL\u6578\u64da\u985e\u578b\u5c0d\u61c9\u4e00\u89bd<\/h1>\n<p>\u5728\u958b\u767c\u61c9\u7528\u7a0b\u5e8f\u6642\uff0c\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u985e\u578b\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002Java\u548cMySQL\u662f\u7576\u4eca\u6700\u6d41\u884c\u7684\u7de8\u7a0b\u8a9e\u8a00\u548c\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\u4e4b\u4e00\u3002\u4e86\u89e3\u9019\u5169\u8005\u4e4b\u9593\u7684\u6578\u64da\u985e\u578b\u5c0d\u61c9\u95dc\u4fc2\uff0c\u53ef\u4ee5\u5e6b\u52a9\u958b\u767c\u8005\u66f4\u6709\u6548\u5730\u9032\u884c\u6578\u64da\u5b58\u5132\u548c\u64cd\u4f5c\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0eJava\u6578\u64da\u985e\u578b\u8207MySQL\u6578\u64da\u985e\u578b\u4e4b\u9593\u7684\u5c0d\u61c9\u95dc\u4fc2\u3002<\/p>\n<h2 id=\"java%e5%9f%ba%e6%9c%ac%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-vUAzTubtNa\">Java\u57fa\u672c\u6578\u64da\u985e\u578b<\/h2>\n<p>Java\u63d0\u4f9b\u4e86\u516b\u7a2e\u57fa\u672c\u6578\u64da\u985e\u578b\uff0c\u5206\u70ba\u6574\u6578\u985e\u578b\u3001\u6d6e\u9ede\u985e\u578b\u3001\u5b57\u7b26\u985e\u578b\u548c\u5e03\u723e\u985e\u578b\uff1a<\/p>\n<ul>\n<li><code>byte<\/code>\uff1a8\u4f4d\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-128\u5230127\u3002<\/li>\n<li><code>short<\/code>\uff1a16\u4f4d\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-32,768\u523032,767\u3002<\/li>\n<li><code>int<\/code>\uff1a32\u4f4d\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-2,147,483,648\u52302,147,483,647\u3002<\/li>\n<li><code>long<\/code>\uff1a64\u4f4d\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-9,223,372,036,854,775,808\u52309,223,372,036,854,775,807\u3002<\/li>\n<li><code>float<\/code>\uff1a32\u4f4d\u6d6e\u9ede\u6578\uff0c\u9069\u5408\u5b58\u5132\u5c0f\u6578\u3002<\/li>\n<li><code>double<\/code>\uff1a64\u4f4d\u6d6e\u9ede\u6578\uff0c\u7cbe\u5ea6\u66f4\u9ad8\u3002<\/li>\n<li><code>char<\/code>\uff1a\u55ae\u4e0016\u4f4dUnicode\u5b57\u7b26\u3002<\/li>\n<li><code>boolean<\/code>\uff1a\u53ea\u6709\u5169\u500b\u503c\uff0c<code>true<\/code>\u6216<code>false<\/code>\u3002<\/li>\n<\/ul>\n<h2 id=\"mysql%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-vUAzTubtNa\">MySQL\u6578\u64da\u985e\u578b<\/h2>\n<p>MySQL\u7684\u6578\u64da\u985e\u578b\u4e3b\u8981\u5206\u70ba\u6578\u5b57\u985e\u578b\u3001\u65e5\u671f\u548c\u6642\u9593\u985e\u578b\u3001\u5b57\u7b26\u4e32\u985e\u578b\u7b49\uff1a<\/p>\n<ul>\n<li><code>TINYINT<\/code>\uff1a1\u5b57\u7bc0\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-128\u5230127\u3002<\/li>\n<li><code>SMALLINT<\/code>\uff1a2\u5b57\u7bc0\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-32,768\u523032,767\u3002<\/li>\n<li><code>INT<\/code>\uff1a4\u5b57\u7bc0\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-2,147,483,648\u52302,147,483,647\u3002<\/li>\n<li><code>BIGINT<\/code>\uff1a8\u5b57\u7bc0\u6574\u6578\uff0c\u7bc4\u570d\u5f9e-9,223,372,036,854,775,808\u52309,223,372,036,854,775,807\u3002<\/li>\n<li><code>FLOAT<\/code>\uff1a\u55ae\u7cbe\u5ea6\u6d6e\u9ede\u6578\u3002<\/li>\n<li><code>DOUBLE<\/code>\uff1a\u96d9\u7cbe\u5ea6\u6d6e\u9ede\u6578\u3002<\/li>\n<li><code>CHAR<\/code>\uff1a\u56fa\u5b9a\u9577\u5ea6\u5b57\u7b26\u4e32\u3002<\/li>\n<li><code>VARCHAR<\/code>\uff1a\u53ef\u8b8a\u9577\u5ea6\u5b57\u7b26\u4e32\u3002<\/li>\n<li><code>DATE<\/code>\uff1a\u65e5\u671f\u985e\u578b\u3002<\/li>\n<li><code>DATETIME<\/code>\uff1a\u65e5\u671f\u548c\u6642\u9593\u985e\u578b\u3002<\/li>\n<\/ul>\n<h2 id=\"java%e8%88%87mysql%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e5%b0%8d%e6%87%89%e8%a1%a8-vUAzTubtNa\">Java\u8207MySQL\u6578\u64da\u985e\u578b\u5c0d\u61c9\u8868<\/h2>\n<p>\u4ee5\u4e0b\u662fJava\u6578\u64da\u985e\u578b\u8207MySQL\u6578\u64da\u985e\u578b\u7684\u5c0d\u61c9\u95dc\u4fc2\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>Java\u6578\u64da\u985e\u578b<\/th>\n<th id=\"mysql%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-vUAzTubtNa\">MySQL\u6578\u64da\u985e\u578b<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>byte<\/code><\/td>\n<td><code>TINYINT<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>short<\/code><\/td>\n<td><code>SMALLINT<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>int<\/code><\/td>\n<td><code>INT<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>long<\/code><\/td>\n<td><code>BIGINT<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>float<\/code><\/td>\n<td><code>FLOAT<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>double<\/code><\/td>\n<td><code>DOUBLE<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>char<\/code><\/td>\n<td><code>CHAR<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>String<\/code><\/td>\n<td><code>VARCHAR<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>java.util.Date<\/code><\/td>\n<td><code>DATETIME<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>boolean<\/code><\/td>\n<td><code>BOOLEAN<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"%e7%b5%90%e8%ab%96-vUAzTubtNa\">\u7d50\u8ad6<\/h2>\n<p>\u4e86\u89e3Java\u548cMySQL\u4e4b\u9593\u7684\u6578\u64da\u985e\u578b\u5c0d\u61c9\u95dc\u4fc2\uff0c\u5c0d\u65bc\u958b\u767c\u8005\u5728\u9032\u884c\u6578\u64da\u5eab\u64cd\u4f5c\u6642\u81f3\u95dc\u91cd\u8981\u3002\u6b63\u78ba\u7684\u6578\u64da\u985e\u578b\u9078\u64c7\u4e0d\u50c5\u80fd\u63d0\u9ad8\u61c9\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\uff0c\u9084\u80fd\u6e1b\u5c11\u6f5b\u5728\u7684\u932f\u8aa4\u3002\u5728\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u6642\uff0c\u8003\u616e\u5230\u6578\u64da\u985e\u578b\u7684\u517c\u5bb9\u6027\u4e5f\u662f\u4e00\u500b\u91cd\u8981\u7684\u56e0\u7d20\u3002\u7121\u8ad6\u662f\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u9084\u662f\u5176\u4ed6\u670d\u52d9\uff0c\u78ba\u4fdd\u60a8\u7684\u61c9\u7528\u7a0b\u5e8f\u80fd\u5920\u9ad8\u6548\u904b\u884c\u662f\u6210\u529f\u7684\u95dc\u9375\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3Java\u6578\u64da\u985e\u578b\u8207MySQL\u6578\u64da\u985e\u578b\u7684\u5c0d\u61c9\u95dc\u4fc2\uff0c\u52a9\u60a8\u66f4\u6709\u6548\u5730\u9032\u884c\u6578\u64da\u5eab\u958b\u767c\u8207\u7ba1\u7406\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-62103","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/62103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=62103"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/62103\/revisions"}],"predecessor-version":[{"id":62104,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/62103\/revisions\/62104"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=62103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=62103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=62103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}