如果我在Oracle中創建一個像這樣的表:ORACLE 11g:如何查詢外部文件中的位置?
SQL> CREATE TABLE emp_load
2 (employee_number CHAR(5),
3 employee_dob CHAR(20),
4 employee_last_name CHAR(20),
5 employee_first_name CHAR(15),
6 employee_middle_name CHAR(15),
7 employee_hire_date DATE)
8 ORGANIZATION EXTERNAL
9 (TYPE ORACLE_LOADER
10 DEFAULT DIRECTORY def_dir1
11 ACCESS PARAMETERS
12 (RECORDS DELIMITED BY NEWLINE
13 FIELDS (employee_number CHAR(2),
14 employee_dob CHAR(20),
15 employee_last_name CHAR(18),
16 employee_first_name CHAR(11),
17 employee_middle_name CHAR(11),
18 employee_hire_date CHAR(10) date_format DATE mask "mm/dd/yyyy"
19 )
20 )
21 LOCATION ('info.dat')
22 );
Table created.
我需要查詢和更新的部分所使用的文件
LOCATION('info.dat')
我想獲得的文件名如:
select LOCATION from <something>.emp_load;
收到錯誤爲:
Error at line 1
ORA-00904: "LOCATION": invalid identifier
什麼是做這個查詢的正確方法?
在此先感謝