• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 22
  • Last Modified:

How to script out a table with data using Oracle Sql developer?

Is there a way to get Oracle sql developer to script out a table for me? The table has about 20 columns of data. There are only about 6 records, but I need to know how to script out the table with it's data, so that I can recreate it.
0
brgdotnet
Asked:
brgdotnet
1 Solution
 
slightwv (䄆 Netminder) Commented:
You can Export the table with the data.  This will only work when moving the data to another Oracle database.

Depending on your version of SQL Developer:

You can get the DDL for the table a few ways.  In the SQL Worksheet try:  ddl table_name

Then you can copy/paste the data or query:  
set sqlformat csv
select *  from table_name;
0
 
awking00Commented:
>>I need to know how to script out the table with it's data, so that I can recreate it.<<
Why do you want to do that? So you can re-populate it? We could use a little more explanation of what you're trying to do. You might consider just truncating the table. That way all of the indexes, constraints, and synonyms, etc. remain intact.
0

Join & Write a Comment

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now