Oracle exports data to excel, CSV, txt, html

Source: Internet
Author: User

------ Spool settings
Common spool settings
Set colsep ''; // The output delimiter of the domain.
Set echo off; // display each SQL command in the Start script. The default value is on
Set feedback off; // display the number of records processed by this SQL command. The default value is on.
Set heading off; // output domain title, on by default
Set pagesize 0; // number of output lines per page. The default value is 24. To avoid paging, you can set the value to 0.
Set termout off; // display the execution results of commands in the script. The default value is on.
Set trimout on; // Remove trailing spaces of each standard output line. The default value is off.
Set trimspool on; // remove the trailing space of each row from the redirection (Spool) output. The default value is off.

------ Code example
Set heading off
Set pagesize 0
Set term off
Set feedback off
Set linesize 9999
Set trimspool off
Set term off verify off feedback off pagesize 9999
Spool D:/B .csv
-- Set markup HTML on entmap on spool on preformat off
Select 'employee ID ', 'name' from dual -- set the title
Union all
Select T. area_id, T. name from area T;
Spool off

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.