How to export data from Oracle to an SQL script

Source: Internet
Author: User
Method 1:

You must use the PL/SQL Dev tool.
1. Open PL/SQL Dev and select the table to be exported. Right-click the table and select export data from the pop-up menu, as shown in ).
 
2. After you click Export data, the export settings window appears on the right, as shown in:
 
Under the window, select the SQL inserts tab and set the export conditions.
3. Click the export button to export the data.

Method 2:

You have to write the program yourself and execute an SQL statement to make the SQL query result the SQL script we want:

As follows:

Select
'Insert into B _stattemplate (n_id, c_name, c_kbh, n_print, n_type, n_app, n_valid )'
| 'Values ('| to_char (n_id) |', ''' | c_name | ''', ''' | c_kbh | ''','
| To_char (n_print) | ',' | to_char (n_type) | ',' | '0, 0 );'
From B _stattemplate

Save the query results!

 

Who has the third method?

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.