{"id":881,"date":"2009-03-07T22:21:36","date_gmt":"2009-03-07T14:21:36","guid":{"rendered":"http:\/\/jason695.why3s.tw\/wordpress\/?p=881"},"modified":"2009-03-13T09:15:16","modified_gmt":"2009-03-13T01:15:16","slug":"oracle%e8%aa%9e%e6%b3%95-2","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2009\/03\/07\/oracle%e8%aa%9e%e6%b3%95-2\/","title":{"rendered":"ORACLE\u8a9e\u6cd5"},"content":{"rendered":"<ul>\n<li>\u6392\u540d\uff1a\n<pre>rank()over(partition by TABLE.COLUMN_1 order by count(distinct TABLE.COLUMN_2)desc)<\/pre>\n<p><em>\u9019\u662f\u5e38\u9700\u8981\u7528,\u4f46\u4e0d\u592a\u6703\u7528\u7684\u8a9e\u6cd5<\/em><\/li>\n<\/ul>\n<ul>\n<li>\u53d6\u5f97TABLE\u53caCOLUMN\u7684\u8cc7\u8a0a\uff1a\n<pre>select distinct table_name from all_tab_cols\r\nwhere owner='XXX'<\/pre>\n<\/li>\n<li>CREAT TABLE\u6642\u52a0\u5927\u7a7a\u9593\uff1a\n<pre>STORAGE\u00a0\u00a0\u00a0 (\r\nINITIAL 512K\r\nMINEXTENTS 1\r\nMAXEXTENTS unlimited\r\n)<\/pre>\n<\/li>\n<li>Truncate_Partition\uff1a<br \/>\n\u82e5\u8cc7\u6599\u6709\u4f9d\u5e74\u6708\u5207PARTITION\u5206\u7684,<br \/>\n\u7576\u8981DELETE\u67d0\u5e74\u6708\u7684\u8cc7\u6599\u6642,<br \/>\n\u53ef\u63a1 TRUNCATE PARTITION\u7684\u65b9\u5f0f,\u53ef\u63d0\u9ad8\u6e05\u8cc7\u6599\u7684\u6548\u7387<\/p>\n<pre>sql_stmt_01 := 'alter table DM_CSV.F_CSV_ACCT_HOLDINGS truncate partition ' || 'P_' || v_SNAP_YYYYMM;\r\nEXECUTE IMMEDIATE sql_stmt_01;<\/pre>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6392\u540d\uff1a rank()over(partition by TABLE.COLUMN_1 order by cou &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2009\/03\/07\/oracle%e8%aa%9e%e6%b3%95-2\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">ORACLE\u8a9e\u6cd5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[41],"tags":[],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-oracle","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=881"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/881\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}