Oracle how to export query to a text/csv file(Oracle 如何将查询导出到文本/csv 文件)
问题描述
我想知道如何将查询从 PL/SQL 导出到文本文件或 csv 文件.我想到的查询导出了大量数据(大约 1 gig).所以我也希望将数据拆分到多个文件中;
I was wondering how to go about exporting a query from PL/SQL to an text file or csv file. The query I have in mind exports a huge amount of data (about 1 gig). So I'd also like the data split across multiple files;
out1.csv输出2.csvout3.csv
out1.csv out2.csv out3.csv
我希望能够决定将它分成多少个文件.
I'd like to be able to decide how many files to split it across.
有人知道怎么做吗?
推荐答案
使用 UTL_FILE.
一个众所周知的(可能是关于这个主题的最完整的讨论)的讨论可以在 Ask Tom 中找到,此处,请注意其中的许多示例都可以追溯到 oracle 8,因此在您的版本中可能有更好的方法甲骨文.
A well known ( probably the most complete discussion on this topic ) discussion on this can be found at Ask Tom, Here , note that many of the examples there date back to oracle 8, so there may be better ways to do it in your version of Oracle.
这篇关于Oracle 如何将查询导出到文本/csv 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Oracle 如何将查询导出到文本/csv 文件
基础教程推荐
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 在多列上分布任意行 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
