oracle db允许以只读的形式查询外部表。外部表可以存储在任何oracle db可以读取的存储设备中,其内容不在db中保存,db只保存external table的metadata,db可以查询(join、sort)external table,可以创建view、synonym,但不可以执行DML语句。
创建外部表语法create table ……orginzition external,可以把外部表假想为一个view,可以正常的做select。
analyze 和 虚拟列 表分析不使用与外部表
创建外部表语法
外部表文件:
example1.txt
360,Jane,Janus,ST_CLERK,121,17-MAY-2001,3000,0,50,jjanus
361,Mark,Jasper,SA_REP,145,17-MAY-2001,8000,.1,80,mjasper
362,Brenda,Starr,AD_ASST,200,17-MAY-2001,5500,0,10,bstarr
363,Alex,Alda,AC_MGR,145,17-MAY-2001,9000,.15,80,aalda
example2.txt
401,Jesse,Cromwell,HR_REP,203,17-MAY-2001,7000,0,40,jcromwel
402,Abby,Applegate,IT_PROG,103,17-MAY-2001,9000,.2,60,aapplega
403,Carol,Cousins,AD_VP,100,17-MAY-2001,27000,.3,90,ccousins
404,John,Richardson,AC_ACCOUNT,205,17-MAY-2001,5000,0,110,jrichard
创建外部表oracle可识别路径:
<code class="hljs oxygene has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">SQL> conn / <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">as</span> sysdba SQL> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">create</span> directory external_dir <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">as</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'/u01/app/oracle/oradata/external'</span>; Directory created. SQL> grant <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">read</span>,<span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">write</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span> directory external_dir <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">to</span> kevin; Grant succeeded.</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul>
外部表的使用用户kevin,创建外部表
<code class="hljs scss has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">SQL> CREATE <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;">TABLE</span> ex_employees 2 (employee_id <span class="hljs-function" style="box-sizing: border-box;">NUMBER(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">4</span>)</span>, 3 first_name <span class="hljs-function" style="box-sizing: border-box;">VARCHAR2(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">20</span>)</span>, 4 last_name <span class="hljs-function" style="box-sizing: border-box;">VARCHAR2(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">25</span>)</span>, 5 job_id <span class="hljs-function" style="box-sizing: border-box;">VARCHAR2(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">10</span>)</span>, 6 manager_id <span class="hljs-function" style="box-sizing: border-box;">NUMBER(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">4</span>)</span>, 7 hire_date DATE, 8 salary <span class="hljs-function" style="box-sizing: border-box;">NUMBER(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">8</span>,<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2</span>)</span>, 9 commission_pct <span class="hljs-function" style="box-sizing: border-box;">NUMBER(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2</span>,<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">2</span>)</span>, 10 department_id <span class="hljs-function" style="box-sizing: border-box;">NUMBER(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">4</span>)</span>, 11 email <span class="hljs-function" style="box-sizing: border-box;">VARCHAR2(<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">25</span>)</span> 12 ) 13 ORGANIZATION EXTERNAL 14 ( 15 TYPE ORACLE_LOADER 16 <span class="hljs-value" style="box-sizing: border-box;">DEFAULT</span> DIRECTORY external_dir 17 ACCESS PARAMETERS 18 ( 19 records delimited by newline 20 badfile external_dir<span class="hljs-value" style="box-sizing: border-box;">:<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'empxt%a_%p.bad'</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">21</span> logfile external_dir:<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'empxt%a_%p.log'</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">22</span> fields terminated by <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">','</span> <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">23</span> missing field values are null <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">24</span> ( employee_id, first_name, last_name, job_id, manager_id, <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">25</span> hire_date char date_format date mask <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"dd-mon-yyyy"</span>, <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">26</span> salary, commission_pct, department_id, email <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">27</span> ) <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">28</span> ) <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">29</span> LOCATION (<span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'example1.txt'</span>, <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">'example2.txt'</span>) <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">30</span> ) <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">31</span> PARALLEL <span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">32</span> REJECT LIMIT UNLIMITED;</span> <span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;">Table</span> created.</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li><li style="box-sizing: border-box; padding: 0px 5px;">22</li><li style="box-sizing: border-box; padding: 0px 5px;">23</li><li style="box-sizing: border-box; padding: 0px 5px;">24</li><li style="box-sizing: border-box; padding: 0px 5px;">25</li><li style="box-sizing: border-box; padding: 0px 5px;">26</li><li style="box-sizing: border-box; padding: 0px 5px;">27</li><li style="box-sizing: border-box; padding: 0px 5px;">28</li><li style="box-sizing: border-box; padding: 0px 5px;">29</li><li style="box-sizing: border-box; padding: 0px 5px;">30</li><li style="box-sizing: border-box; padding: 0px 5px;">31</li><li style="box-sizing: border-box; padding: 0px 5px;">32</li><li style="box-sizing: border-box; padding: 0px 5px;">33</li><li style="box-sizing: border-box; padding: 0px 5px;">34</li></ul>
创建完成后可以可以通过cats把数据导入至数据库的表中,如果数据比较多,可以开启session level parallel导入
<code class="hljs brainfuck has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">alter</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">session</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">enable</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">parallel;</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">create</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">table</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">employee</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">as</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">select</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">*</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">from</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">ex_employee;</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">EMPLOYEE_ID</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">FIRST_NAME</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">LAST_NAME</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">JOB_ID</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MANAGER_ID</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">HIRE_DATE</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">SALARY</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">COMMISSION_PCT</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">DEPARTMENT_ID</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">EMAIL</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">360</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Jane</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Janus</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">ST_CLERK</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">121</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">3000</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">0</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">50</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">jjanus</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">361</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Mark</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Jasper</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">SA_REP</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">145</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">8000</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">1</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">80</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">mjasper</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">362</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Brenda</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Starr</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">AD_ASST</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">200</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">5500</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">0</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">10</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">bstarr</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">363</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Alex</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Alda</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">AC_MGR</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">145</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">9000</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">15</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">80</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">aalda</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">401</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Jesse</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Cromwell</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">HR_REP</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">203</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">7000</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">0</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">40</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">jcromwel</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">402</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Abby</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Applegate</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">IT_PROG</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">103</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">9000</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">2</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">60</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">aapplega</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">403</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Carol</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Cousins</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">AD_VP</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">100</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">27000</span> <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">3</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">90</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">ccousins</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">404</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">John</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">Richardson</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">AC_ACCOUNT</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">205</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">17</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">MAY</span><span class="hljs-literal" style="color: rgb(0, 102, 102); box-sizing: border-box;">-</span><span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">01</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">5000</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">0</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">110</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">jrichard</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">10</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">rows</span> <span class="hljs-comment" style="color: rgb(136, 0, 0); box-sizing: border-box;">selected</span><span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">.</span> </code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li><li style="box-sizing: border-box; padding: 0px 5px;">11</li><li style="box-sizing: border-box; padding: 0px 5px;">12</li><li style="box-sizing: border-box; padding: 0px 5px;">13</li><li style="box-sizing: border-box; padding: 0px 5px;">14</li><li style="box-sizing: border-box; padding: 0px 5px;">15</li><li style="box-sizing: border-box; padding: 0px 5px;">16</li><li style="box-sizing: border-box; padding: 0px 5px;">17</li><li style="box-sizing: border-box; padding: 0px 5px;">18</li><li style="box-sizing: border-box; padding: 0px 5px;">19</li><li style="box-sizing: border-box; padding: 0px 5px;">20</li><li style="box-sizing: border-box; padding: 0px 5px;">21</li></ul>
创建完成,外部表可以正常使用