How to create an insert script from a table using TOAD, oracle?

I used TOAD for oracle 11g, I want to create an insert script from a table. or I want to create a script file that allows eclipse to rebuild the entire database with its data.

+4
source share
5 answers

decision:

data base > schema browser

then I select the table in:

 > my schema > tables > my_table 

to export the script so you can create your table:

script> (copy the create table part)

To export alla data:

 >data > export dataset (blue icone) > export format : insert statement (and specify the output file) 

then you can regroup two scripts into one script.sql (in order)

+9
source

enter image description here

Run the Ex request: Select * from employee;

In the table result table> Click on the Export Grid Content 'icon (marked in yellow in the image above)

Select Export Format as Insert Expressions > Click OK

You are done!

+5
source

There are ICONS database level and ICONS table level in the toad.

ICONS databases are those that access at the top, just below (for Ex: Toad For Oracle).

They start from left to right, File / Edit / Search / Editor / Session ....

Table level ICONS are those that appear when a table or piece of data is selected

grid (when data is displayed for the table).

You can import from ICONS databases and export to a .dmp file

but you cannot export to SQL LOADER or INSERT STATEMENT from the ICONS database, so use

Table level icons. See the following steps:

a.

  • Highlight a table
  • Right click on the table
  • Export table
  • In export format: select "Insert Expressions"

OR

IN.

When the table has data, and you have selected the "Data" tab, you will have below

Column / Indexes / Constraints / Triggers / Data / Script tabs several ICONS, IE filter Funnel,

and three ICONS on the right, you will have a database icon (IN BLUE).

You can click on it and select the export format.

+4
source

Right click on the table in Schemabrowser -> Generate Statement -> Insert

+1
source

you can create an insert script with toad, write the table name in toad and press F4, then right-click on the table name and select data export, and then open a new window, select the export format as the insert statement, and then the file path to save, the script will be generated at the specified path .....

0
source

Source: https://habr.com/ru/post/1438653/


All Articles