{"id":395,"date":"2014-04-11T13:59:14","date_gmt":"2014-04-11T05:59:14","guid":{"rendered":"http:\/\/www.royalwzy.com\/?p=395"},"modified":"2014-04-11T14:10:27","modified_gmt":"2014-04-11T06:10:27","slug":"oracle%e4%b8%ad%e5%b7%a5%e5%85%b7%e7%9a%84%e4%bd%bf%e7%94%a809-copy","status":"publish","type":"post","link":"http:\/\/www.royalwzy.com\/?p=395","title":{"rendered":"ORACLE\u4e2d\u5de5\u5177\u7684\u4f7f\u752809&#8211;COPY"},"content":{"rendered":"<p>COPY\u5de5\u5177\u7684\u4f7f\u7528:<\/p>\n<p>  1. COPY\u662fsqlplus\u4e2d\u7684\u547d\u4ee4;<br \/>\n  2. \u5728sqlplus\u4e2d\u901a\u8fc7help copy\u67e5\u770b\u5e2e\u52a9;<br \/>\n  3. \u4e00\u4e2a\u8868\u4e2d\u53ea\u80fd\u5305\u542b\u4e00\u4e2along\u578b\u5b57\u6bb5,\u5728\u6570\u636e\u5b57\u5178\u4e2d\u5927\u91cf\u4f7f\u7528\u4e86long\u578b\u5b57\u6bb5;\u4f46\u662f\u5305\u542blong\u7c7b\u578b\u7684\u8868\u4e0d\u80fd\u4f7f\u7528CTAS\u8bed\u6cd5\u521b\u5efa\u65b0\u8868;\u6b64\u65f6\u53ef\u4ee5\u4f7f\u7528copy\u547d\u4ee4;<br \/>\n  4. \u6bd4\u5982dba_tab_cols\u89c6\u56fe\u662f\u57fa\u4e8ecols$\u8868\u7684,\u5305\u542b\u4e86\u4e00\u4e2aLONG\u7c7b\u578b,\u5982\u679c\u76f4\u63a5\u521b\u5efa:CREATE TABLE tbcols AS SELECT * FROM dba_tab_cols;<br \/>\n 5. \u4f7f\u7528copy\u547d\u4ee4\u521b\u5efa:copy from system\/ORACLE@orcl to system\/ORACLE@orcl CREATE TBCOLS USING SELECT * FROM dba_tab_cols;              <\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- COPY\u7684\u5e2e\u52a9\u6587\u6863 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nSQL> help copy<\/p>\n<p>COPY<br \/>\n&#8212;-<\/p>\n<p>Copies data from a query to a table in the same or another<br \/>\ndatabase. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.<\/p>\n<p>COPY {FROM database | TO database | FROM database TO database}<br \/>\n            {APPEND|CREATE|INSERT|REPLACE} destination_table<br \/>\n            [(column, column, column, &#8230;)] USING query<\/p>\n<p>where database has the following syntax:<br \/>\n     username[\/password]@connect_identifier<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- COPY\u7684\u5e2e\u52a9\u6587\u6863 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>COPY\u5de5\u5177\u7684\u4f7f\u7528: 1. COPY\u662fsqlplus\u4e2d\u7684\u547d\u4ee4; 2. \u5728sqlplus\u4e2d\u901a\u8fc7help copy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[2],"class_list":["post-395","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle_basics"],"_links":{"self":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=395"}],"version-history":[{"count":0,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=\/wp\/v2\/posts\/395\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.royalwzy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}