简体   繁体   中英

Export to a file from SQL Developer?

I am trying to run the export command in SQL Developer. I get the error message "Unknown Command". Searching the web, I am told by many to run catexp.sql . I don't have that file, and I don't know how to download it. Can anyone help me run this command? How do I find catexp.sql? Using the export functionality is not a feasible option since I must run the code below about 80 times.

exp username/password direct = y file = C:\mypath\mydata.csv tables = TABLE.TABLENAME query =\"Where rownum\<=5000000\"

Thanks in advance.

exp is a commandline program, not a SQL command.

You cannot run that from within any SQL client (including SQL Developer).

Additionally exp is somewhat deprecated anyway and you should use DataPump in order to export your data.

DataPump can be accessed through SQL using the dbms_datapump package and will write the dump file into a directory on the server.

dbms_datapump is documented extensively in the manual

There are also several examples available:

You can just write a query in SQL Developer:

select /*csv*/ * from tableName

Then copy/paste the results to a new file.

This question How to export query result to csv in Oracle SQL Developer? also has several other suggestions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM