Oracle how to export query to a text/csv file
问题 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 out2.csv out3.csv I'd like to be able to decide how many files to split it across. Anyone have any idea how to do this? 回答1: Use UTL_FILE. A well known ( probably the most complete discussion on this topic ) discussion on this can be found at Ask Tom, Here , note that