{"id":171339,"date":"2024-11-07T01:55:17","date_gmt":"2024-11-06T17:55:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/171339\/"},"modified":"2024-11-07T01:55:17","modified_gmt":"2024-11-06T17:55:17","slug":"%e6%b7%ba%e8%ab%87oracle%e6%95%b8%e6%93%9a%e5%ba%ab%e6%96%b0%e6%89%8b%e9%96%8b%e7%99%bc%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/171339\/","title":{"rendered":"\u6dfa\u8ac7Oracle\u6578\u64da\u5eab\u65b0\u624b\u958b\u767c\u6307\u5357"},"content":{"rendered":"<h1 id=\"%e6%b7%ba%e8%ab%87oracle%e6%95%b8%e6%93%9a%e5%ba%ab%e6%96%b0%e6%89%8b%e9%96%8b%e7%99%bc%e6%8c%87%e5%8d%97-lVhGhNeLUE\">\u6dfa\u8ac7Oracle\u6578\u64da\u5eab\u65b0\u624b\u958b\u767c\u6307\u5357<\/h1>\n<p>Oracle\u6578\u64da\u5eab\u662f\u4e00\u6b3e\u529f\u80fd\u5f37\u5927\u7684\u95dc\u806f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u4f01\u696d\u7d1a\u61c9\u7528\u4e2d\u3002\u5c0d\u65bc\u65b0\u624b\u958b\u767c\u8005\u4f86\u8aaa\uff0c\u638c\u63e1Oracle\u6578\u64da\u5eab\u7684\u57fa\u672c\u6982\u5ff5\u548c\u958b\u767c\u6280\u5de7\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u672c\u6587\u5c07\u4ecb\u7d39Oracle\u6578\u64da\u5eab\u7684\u57fa\u672c\u67b6\u69cb\u3001\u5e38\u7528\u7684SQL\u8a9e\u53e5\u3001\u4ee5\u53ca\u4e00\u4e9b\u958b\u767c\u4e2d\u7684\u6700\u4f73\u5be6\u8e10\u3002<\/p>\n<h2 id=\"oracle%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%9e%b6%e6%a7%8b-lVhGhNeLUE\">Oracle\u6578\u64da\u5eab\u7684\u57fa\u672c\u67b6\u69cb<\/h2>\n<p>Oracle\u6578\u64da\u5eab\u7684\u67b6\u69cb\u4e3b\u8981\u7531\u4ee5\u4e0b\u5e7e\u500b\u90e8\u5206\u7d44\u6210\uff1a<\/p>\n<ul>\n<li><strong>\u5be6\u4f8b\uff08Instance\uff09<\/strong>\uff1a\u5be6\u4f8b\u662fOracle\u6578\u64da\u5eab\u7684\u904b\u884c\u74b0\u5883\uff0c\u5305\u62ec\u5167\u5b58\u7d50\u69cb\u548c\u80cc\u666f\u9032\u7a0b\u3002<\/li>\n<li><strong>\u6578\u64da\u6587\u4ef6\uff08Data Files\uff09<\/strong>\uff1a\u6578\u64da\u6587\u4ef6\u662f\u5b58\u5132\u6578\u64da\u7684\u7269\u7406\u6587\u4ef6\uff0c\u901a\u5e38\u4ee5.dbf\u70ba\u64f4\u5c55\u540d\u3002<\/li>\n<li><strong>\u63a7\u5236\u6587\u4ef6\uff08Control Files\uff09<\/strong>\uff1a\u63a7\u5236\u6587\u4ef6\u5305\u542b\u6578\u64da\u5eab\u7684\u7d50\u69cb\u4fe1\u606f\uff0c\u5982\u6578\u64da\u6587\u4ef6\u7684\u4f4d\u7f6e\u548c\u72c0\u614b\u3002<\/li>\n<li><strong>\u91cd\u505a\u65e5\u8a8c\uff08Redo Logs\uff09<\/strong>\uff1a\u91cd\u505a\u65e5\u8a8c\u7528\u65bc\u8a18\u9304\u6578\u64da\u5eab\u7684\u6240\u6709\u8b8a\u66f4\uff0c\u4ee5\u4fbf\u5728\u6545\u969c\u6062\u5fa9\u6642\u4f7f\u7528\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%9f%ba%e6%9c%acsql%e8%aa%9e%e5%8f%a5-lVhGhNeLUE\">\u57fa\u672cSQL\u8a9e\u53e5<\/h2>\n<p>\u5728Oracle\u6578\u64da\u5eab\u4e2d\uff0cSQL\uff08\u7d50\u69cb\u5316\u67e5\u8a62\u8a9e\u8a00\uff09\u662f\u7528\u65bc\u67e5\u8a62\u548c\u64cd\u4f5c\u6578\u64da\u7684\u4e3b\u8981\u8a9e\u8a00\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684SQL\u8a9e\u53e5\u793a\u4f8b\uff1a<\/p>\n<h3 id=\"1-%e5%89%b5%e5%bb%ba%e8%a1%a8-lVhGhNeLUE\">1. \u5275\u5efa\u8868<\/h3>\n<pre><code>CREATE TABLE employees (\n    employee_id NUMBER PRIMARY KEY,\n    first_name VARCHAR2(50),\n    last_name VARCHAR2(50),\n    hire_date DATE\n);<\/code><\/pre>\n<h3 id=\"2-%e6%8f%92%e5%85%a5%e6%95%b8%e6%93%9a-lVhGhNeLUE\">2. \u63d2\u5165\u6578\u64da<\/h3>\n<pre><code>INSERT INTO employees (employee_id, first_name, last_name, hire_date)\nVALUES (1, 'John', 'Doe', TO_DATE('2023-01-01', 'YYYY-MM-DD'));<\/code><\/pre>\n<h3 id=\"3-%e6%9f%a5%e8%a9%a2%e6%95%b8%e6%93%9a-lVhGhNeLUE\">3. \u67e5\u8a62\u6578\u64da<\/h3>\n<pre><code>SELECT * FROM employees WHERE hire_date &gt; TO_DATE('2022-01-01', 'YYYY-MM-DD');<\/code><\/pre>\n<h3 id=\"4-%e6%9b%b4%e6%96%b0%e6%95%b8%e6%93%9a-lVhGhNeLUE\">4. \u66f4\u65b0\u6578\u64da<\/h3>\n<pre><code>UPDATE employees SET last_name = 'Smith' WHERE employee_id = 1;<\/code><\/pre>\n<h3 id=\"5-%e5%88%aa%e9%99%a4%e6%95%b8%e6%93%9a-lVhGhNeLUE\">5. \u522a\u9664\u6578\u64da<\/h3>\n<pre><code>DELETE FROM employees WHERE employee_id = 1;<\/code><\/pre>\n<h2 id=\"%e9%96%8b%e7%99%bc%e4%b8%ad%e7%9a%84%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90-lVhGhNeLUE\">\u958b\u767c\u4e2d\u7684\u6700\u4f73\u5be6\u8e10<\/h2>\n<p>\u5728\u4f7f\u7528Oracle\u6578\u64da\u5eab\u9032\u884c\u958b\u767c\u6642\uff0c\u9075\u5faa\u4e00\u4e9b\u6700\u4f73\u5be6\u8e10\u53ef\u4ee5\u63d0\u9ad8\u958b\u767c\u6548\u7387\u548c\u6578\u64da\u5eab\u6027\u80fd\uff1a<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u9810\u8655\u7406\u8a9e\u53e5<\/strong>\uff1a\u9810\u8655\u7406\u8a9e\u53e5\u53ef\u4ee5\u63d0\u9ad8\u67e5\u8a62\u6027\u80fd\u4e26\u9632\u6b62SQL\u6ce8\u5165\u653b\u64ca\u3002<\/li>\n<li><strong>\u5b9a\u671f\u5099\u4efd\u6578\u64da<\/strong>\uff1a\u5b9a\u671f\u5099\u4efd\u53ef\u4ee5\u9632\u6b62\u6578\u64da\u4e1f\u5931\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b89\u5168\u6027\u3002<\/li>\n<li><strong>\u512a\u5316\u67e5\u8a62<\/strong>\uff1a\u4f7f\u7528\u7d22\u5f15\u548c\u67e5\u8a62\u8a08\u5283\u4f86\u512a\u5316\u67e5\u8a62\u6027\u80fd\uff0c\u6e1b\u5c11\u67e5\u8a62\u6642\u9593\u3002<\/li>\n<li><strong>\u76e3\u63a7\u6027\u80fd<\/strong>\uff1a\u4f7f\u7528Oracle\u63d0\u4f9b\u7684\u6027\u80fd\u76e3\u63a7\u5de5\u5177\u4f86\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u6027\u80fd\u74f6\u9838\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-lVhGhNeLUE\">\u7d50\u8ad6<\/h2>\n<p>Oracle\u6578\u64da\u5eab\u662f\u4e00\u500b\u5f37\u5927\u7684\u5de5\u5177\uff0c\u9069\u5408\u7528\u65bc\u5404\u7a2e\u4f01\u696d\u61c9\u7528\u3002\u5c0d\u65bc\u65b0\u624b\u958b\u767c\u8005\u4f86\u8aaa\uff0c\u7406\u89e3\u5176\u57fa\u672c\u67b6\u69cb\u3001\u638c\u63e1\u5e38\u7528\u7684SQL\u8a9e\u53e5\u4ee5\u53ca\u9075\u5faa\u6700\u4f73\u5be6\u8e10\u662f\u6210\u529f\u7684\u95dc\u9375\u3002\u96a8\u8457\u7d93\u9a57\u7684\u7a4d\u7d2f\uff0c\u958b\u767c\u8005\u5c07\u80fd\u5920\u66f4\u6709\u6548\u5730\u5229\u7528Oracle\u6578\u64da\u5eab\u7684\u5f37\u5927\u529f\u80fd\uff0c\u70ba\u4f01\u696d\u5275\u9020\u66f4\u5927\u7684\u50f9\u503c\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5c0d\u65bcVPS\u3001<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216\u5176\u4ed6\u76f8\u95dc\u670d\u52d9\u611f\u8208\u8da3\uff0c\u6b61\u8fce\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22Oracle\u6578\u64da\u5eab\u65b0\u624b\u958b\u767c\u6307\u5357\uff0c\u638c\u63e1\u57fa\u672c\u6982\u5ff5\u3001\u5de5\u5177\u4f7f\u7528\u53ca\u6700\u4f73\u5be6\u8e10\uff0c\u52a9\u4f60\u5feb\u901f\u4e0a\u624b\u6578\u64da\u5eab\u958b\u767c\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-171339","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171339","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=171339"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171339\/revisions"}],"predecessor-version":[{"id":171340,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171339\/revisions\/171340"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=171339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=171339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=171339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}