Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

sql

oracle

toad

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 their data.

like image 747
Karim Oukara Avatar asked Oct 09 '12 12:10

Karim Oukara


2 Answers

enter image description here

Run your query Ex: Select * from employee;

In the table result grid > Click on 'Export grid Contents' icon (Marked in yellow in the above image)

Select Export Format as 'Insert Statements' > Click OK

You are done!

like image 194
AnonymousCoder Avatar answered Oct 15 '22 00:10

AnonymousCoder


the solution is :

data base > schema browser

then I select a table in :

> my schema > tables > my_table

to export the script to allow you to create your table :

script > (copy past 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 the two script in a single script.sql (in order)

like image 41
Karim Oukara Avatar answered Oct 15 '22 00:10

Karim Oukara