在PL/SQL中导入CSV数据可以通过以下步骤实现:
CREATE TABLE ext_table
(
column1 datatype,
column2 datatype,
...
)
ORGANIZATION EXTERNAL
(
TYPE ORACLE_LOADER
DEFAULT DIRECTORY directory_name
ACCESS PARAMETERS
(
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY comma
...
)
LOCATION ('file_name.csv')
)
REJECT LIMIT UNLIMITED;
INSERT INTO target_table
SELECT *
FROM ext_table;
注意事项:
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: plsql怎么查看sql执行效率