SQL PLUS export data to generate text files

Source: Internet
Author: User

SQL PLUS exports data to generate a text file to export data in a table to generate a text file, column and column are separated by "|" www.2cto.com SET echo OFFSET feedback OFFSET newpage noneSET pagesize 5000 SET linesize 500 SET verify OFFSET pagesize 0 SET term OFFSET trims ONSET linesize 600 SET heading OFFSET timing OFFSET verify OFFSET numwidth 38 SPOOL c: \ drop_table.sqlSELECT DEPTNO | '| dname from dept; spool off through the above example, we can set: www.2cto.com echo offset feedback offset ne Wpage noneset pagesize 5000 set linesize 500 set verify offset pagesize 0 set term offset trims onset linesize 600 set heading off set timing offset verify offset numwidth 38 SPOOL c: \ The specific file name of the SQL statement you want to run SPOOL OFF as a template, as long as the necessary statements are assumed to be the template.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.