Forum : Export the results of Select query into text file
Brief description  about Online courses   join in Online courses
View shivam agarwal 's Profile

Export the results of Select query into text file

Hello everyone,

I am using "Oracle sql developer" and want to save select query results into a text file.
Please suggest me SQL query to get it done.

Thanks
Asked by shivam agarwal | Oct 30, 2013 |  Reply now
Replies (1)
View arun kumar das 's Profile
A mechanism for writing the results of a select statement into a text file on the server.

For Example

Given a query such as

SELECT order_id,product_name,qty FROM orders

which returns three columns of data, the results can be placed into the file /tmo/orders.txt using the query:

SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE '/tmp/orders.txt'

This will create a tab-separated file, each row on its own line.
Nov 13, 2013