{"id":80626,"date":"2024-10-16T14:34:13","date_gmt":"2024-10-16T06:34:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/80626\/"},"modified":"2024-10-16T14:34:13","modified_gmt":"2024-10-16T06:34:13","slug":"mysql%e8%bd%89oracle%e9%81%87%e5%88%b0%e7%9a%84%e5%95%8f%e9%a1%8c%ef%bc%9a%e8%a1%a8%e5%90%8d%e9%95%b7%e5%ba%a6%e5%8f%8a%e5%a4%a7%e5%b0%8f%e5%af%ab%e5%95%8f%e9%a1%8c","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/80626\/","title":{"rendered":"MySQL\u8f49Oracle\u9047\u5230\u7684\u554f\u984c\uff1a\u8868\u540d\u9577\u5ea6\u53ca\u5927\u5c0f\u5beb\u554f\u984c"},"content":{"rendered":"<h1 id=\"mysql%e8%bd%89oracle%e9%81%87%e5%88%b0%e7%9a%84%e5%95%8f%e9%a1%8c%ef%bc%9a%e8%a1%a8%e5%90%8d%e9%95%b7%e5%ba%a6%e5%8f%8a%e5%a4%a7%e5%b0%8f%e5%af%ab%e5%95%8f%e9%a1%8c-suHTfatUUT\">MySQL\u8f49Oracle\u9047\u5230\u7684\u554f\u984c\uff1a\u8868\u540d\u9577\u5ea6\u53ca\u5927\u5c0f\u5beb\u554f\u984c<\/h1>\n<p>\u5728\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\u7684\u4e16\u754c\u4e2d\uff0cMySQL\u548cOracle\u662f\u5169\u500b\u975e\u5e38\u6d41\u884c\u7684\u9078\u64c7\u3002\u96a8\u8457\u4f01\u696d\u9700\u6c42\u7684\u8b8a\u5316\uff0c\u8a31\u591a\u958b\u767c\u8005\u548c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u80fd\u6703\u9762\u81e8\u5c07MySQL\u6578\u64da\u5eab\u9077\u79fb\u5230Oracle\u7684\u6311\u6230\u3002\u5728\u9019\u500b\u904e\u7a0b\u4e2d\uff0c\u8868\u540d\u7684\u9577\u5ea6\u53ca\u5927\u5c0f\u5beb\u554f\u984c\u662f\u5e38\u898b\u7684\u969c\u7919\u4e4b\u4e00\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u9019\u4e9b\u554f\u984c\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e8%a1%a8%e5%90%8d%e9%95%b7%e5%ba%a6%e5%95%8f%e9%a1%8c-suHTfatUUT\">\u8868\u540d\u9577\u5ea6\u554f\u984c<\/h2>\n<p>\u5728MySQL\u4e2d\uff0c\u8868\u540d\u7684\u6700\u5927\u9577\u5ea6\u70ba64\u500b\u5b57\u7b26\uff0c\u800c\u5728Oracle\u4e2d\uff0c\u8868\u540d\u7684\u6700\u5927\u9577\u5ea6\u5247\u70ba30\u500b\u5b57\u7b26\u3002\u9019\u610f\u5473\u8457\u5728\u5c07MySQL\u6578\u64da\u5eab\u9077\u79fb\u5230Oracle\u6642\uff0c\u82e5\u8868\u540d\u8d85\u904e30\u500b\u5b57\u7b26\uff0c\u5c07\u6703\u5c0e\u81f4\u9077\u79fb\u5931\u6557\u6216\u6578\u64da\u4e1f\u5931\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5047\u8a2d\u5728MySQL\u4e2d\u6709\u4e00\u500b\u8868\u540d\u70ba\uff1a<\/p>\n<pre><code>CREATE TABLE very_long_table_name_that_exceeds_the_limit (id INT);<\/code><\/pre>\n<p>\u9019\u6a23\u7684\u8868\u540d\u5728Oracle\u4e2d\u5c07\u7121\u6cd5\u4f7f\u7528\uff0c\u56e0\u70ba\u5b83\u8d85\u904e\u4e8630\u500b\u5b57\u7b26\u7684\u9650\u5236\u3002\u70ba\u4e86\u89e3\u6c7a\u9019\u500b\u554f\u984c\uff0c\u958b\u767c\u8005\u9700\u8981\u5728\u9077\u79fb\u4e4b\u524d\u5c0d\u8868\u540d\u9032\u884c\u91cd\u547d\u540d\uff0c\u78ba\u4fdd\u6240\u6709\u8868\u540d\u90fd\u7b26\u5408Oracle\u7684\u9650\u5236\u3002<\/p>\n<h3 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-suHTfatUUT\">\u89e3\u6c7a\u65b9\u6848<\/h3>\n<ul>\n<li>\u5728\u9077\u79fb\u4e4b\u524d\uff0c\u4f7f\u7528SQL\u67e5\u8a62\u6aa2\u67e5\u6240\u6709\u8868\u540d\u7684\u9577\u5ea6\uff1a<\/li>\n<pre><code>SELECT table_name FROM information_schema.tables WHERE LENGTH(table_name) &gt; 30;<\/code><\/pre>\n<li>\u5c0d\u65bc\u8d85\u904e\u9650\u5236\u7684\u8868\u540d\uff0c\u4f7f\u7528ALTER TABLE\u8a9e\u53e5\u9032\u884c\u91cd\u547d\u540d\uff1a<\/li>\n<pre><code>ALTER TABLE very_long_table_name_that_exceeds_the_limit RENAME TO short_name;<\/code><\/pre>\n<\/ul>\n<h2 id=\"%e5%a4%a7%e5%b0%8f%e5%af%ab%e5%95%8f%e9%a1%8c-suHTfatUUT\">\u5927\u5c0f\u5beb\u554f\u984c<\/h2>\n<p>MySQL\u5c0d\u5927\u5c0f\u5beb\u7684\u8655\u7406\u76f8\u5c0d\u9748\u6d3b\uff0c\u9ed8\u8a8d\u60c5\u6cc1\u4e0b\uff0c\u8868\u540d\u662f\u5927\u5c0f\u5beb\u4e0d\u654f\u611f\u7684\u3002\u7136\u800c\uff0c\u5728Oracle\u4e2d\uff0c\u8868\u540d\u662f\u5927\u5c0f\u5beb\u654f\u611f\u7684\uff0c\u9019\u53ef\u80fd\u6703\u5c0e\u81f4\u5728\u9077\u79fb\u904e\u7a0b\u4e2d\u51fa\u73fe\u554f\u984c\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u5728MySQL\u4e2d\uff0c\u4ee5\u4e0b\u5169\u500b\u8868\u540d\u88ab\u8996\u70ba\u76f8\u540c\uff1a<\/p>\n<pre><code>CREATE TABLE mytable (id INT);<\/code><\/pre>\n<pre><code>CREATE TABLE MyTable (id INT);<\/code><\/pre>\n<p>\u4f46\u5728Oracle\u4e2d\uff0c\u9019\u5169\u500b\u8868\u540d\u662f\u4e0d\u540c\u7684\uff0c\u9019\u53ef\u80fd\u6703\u5c0e\u81f4\u67e5\u8a62\u932f\u8aa4\u6216\u6578\u64da\u4e0d\u4e00\u81f4\u3002<\/p>\n<h3 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-suHTfatUUT\">\u89e3\u6c7a\u65b9\u6848<\/h3>\n<ul>\n<li>\u5728\u9077\u79fb\u4e4b\u524d\uff0c\u6aa2\u67e5\u6240\u6709\u8868\u540d\u7684\u5927\u5c0f\u5beb\uff0c\u78ba\u4fdd\u4e00\u81f4\u6027\uff1a<\/li>\n<pre><code>SELECT table_name FROM user_tables;<\/code><\/pre>\n<li>\u5c0d\u65bc\u5927\u5c0f\u5beb\u4e0d\u4e00\u81f4\u7684\u8868\u540d\uff0c\u4f7f\u7528ALTER TABLE\u8a9e\u53e5\u9032\u884c\u91cd\u547d\u540d\uff1a<\/li>\n<pre><code>ALTER TABLE mytable RENAME TO MYTABLE;<\/code><\/pre>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-suHTfatUUT\">\u7d50\u8ad6<\/h2>\n<p>\u5728\u5c07MySQL\u6578\u64da\u5eab\u9077\u79fb\u5230Oracle\u7684\u904e\u7a0b\u4e2d\uff0c\u8868\u540d\u7684\u9577\u5ea6\u53ca\u5927\u5c0f\u5beb\u554f\u984c\u662f\u4e0d\u53ef\u5ffd\u8996\u7684\u6311\u6230\u3002\u901a\u904e\u63d0\u524d\u6aa2\u67e5\u548c\u9069\u7576\u7684\u91cd\u547d\u540d\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u907f\u514d\u9019\u4e9b\u554f\u984c\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b8c\u6574\u6027\u548c\u4e00\u81f4\u6027\u3002\u5c0d\u65bc\u9700\u8981\u9032\u884c\u6578\u64da\u5eab\u9077\u79fb\u7684\u958b\u767c\u8005\u548c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u4f86\u8aaa\uff0c\u4e86\u89e3\u9019\u4e9b\u6f5b\u5728\u7684\u554f\u984c\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u95dc\u65bc\u6578\u64da\u5eab\u7ba1\u7406\u548c\u96f2\u670d\u52d9\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9 <a href=\"https:\/\/server.hk\">Server.HK<\/a>\uff0c\u6211\u5011\u63d0\u4f9b\u5404\u7a2e <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0c\u5e6b\u52a9\u60a8\u8f15\u9b06\u7ba1\u7406\u60a8\u7684\u6578\u64da\u5eab\u548c\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u8a0eMySQL\u8f49Oracle\u904e\u7a0b\u4e2d\u9047\u5230\u7684\u8868\u540d\u9577\u5ea6\u53ca\u5927\u5c0f\u5beb\u554f\u984c\uff0c\u63d0\u4f9b\u89e3\u6c7a\u65b9\u6848\u8207\u6700\u4f73\u5be6\u8e10\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-80626","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/80626","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"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=80626"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/80626\/revisions"}],"predecessor-version":[{"id":80627,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/80626\/revisions\/80627"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=80626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=80626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=80626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}