4

i have created tables and views, and insrted some test data, but i want to know where i can get the sql code that i used to create and insert the data, i tried to look in the sql history, but its no thier, thanks :))

2 Answers 2

2

You can get the SQL required to create and populate the table:

1) For the create table DDL, go to the Tables node and select the table, then click on the SQL tab and copy the DDL it displays.

2) For the insert DML, right-click on the table name in the Tables node and select Export Data then Insert... and fill in the wizard. You can also get the create table DDL this way rather than as I said in step 1.

Sign up to request clarification or add additional context in comments.

Comments

1

history F8 should show you everything that has happened in that tab within SQL Developer (for instance file xyz.sql).
if you cannot find the history or the ddl that you wish, you ought to be able to get the ddl 'simply' enough by

select * 
  from addmas
 where colA = 'my criteria'
;

then clicking F9, then right clicking onto the grid and export data to 'insert' and that will create the insert statments for you (keep in mind to put in a table name)

to get the CREATE TABLE/VIEW (or object, not the alter tables) you may right click on the table name, select 'edit' then go down to DDL (create). If you use that tool for your edits it'll also show you the ddl for the alters

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.