views:

21

answers:

1

I've searched through all of the responses on SQL Developer and I haven't found a response that matches this question. I need to be able to see the SQL for a table/view etc by clicking on the sql tab, but for now it simply shows me a blank screen. Has anyone else solved this? It works fine in toad and I can see the code but we have a new server and I can't connect to it with toad. Any help would be nice.

A: 

Not sure exactly what you mean, but: 1. Can you connect to your db using Sqldev? Can you expand the list of schema objects and see your tables? 2. If so then when you open a sql worksheet, yes it is blank., this is where you type your sql statement and execute it. Type the FROM clause first, then go back and add the select clause and sql dev will show a drop down list of columns for the tables you can select from w/o typing the col names. 3. If you want to see you table data, simply double click the table in the tree browser on the left. You can also build queries graphically though drag and drop. But, normal behavior of the SQL worksheet window is to display blank, so not sure exactly what you expecting to happen.

If you select a view and right click and select Export DDL and Select Save to Worksheet, then the DDL is pasted into a worksheet: Example: CREATE TABLE "HR"."COUNTRIES" ( "COUNTRY_ID" CHAR(2 BYTE) CONSTRAINT "COUNTRY_ID_NN" NOT NULL ENABLE, "COUNTRY_NAME" VARCHAR2(40 BYTE), "REGION_ID" NUMBER, CONSTRAINT "COUNTRY_C_ID_PK" PRIMARY KEY ("COUNTRY_ID") ENABLE, CONSTRAINT "COUNTR_REG_FK" FOREIGN KEY ("REGION_ID") REFERENCES "HR"."REGIONS" ("REGION_ID") ENABLE ) ORGANIZATION INDEX NOCOMPRESS PCTFREE 10 INITRANS 2 MAXTRANS 255 LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" PCTTHRESHOLD 50;

SQL DDL statements show the 'code' to create the schema object.

Joe
Maybe I was misinformed by our dba (not exactly an uncommon occurrence), he told me if I selected on a view then selected the SQL tab that it would show the underlying code for the view. To me it is just blank even though when I see it on his computer it shows code. I've never really needed that tab before so I'm not as familiar with it. I learned Oracle SQL through command-line and have never been great with the gui editors.
Micharch54
I thik it's a terminology issue.
Joe
right click the view and select EXPORT DDL -> Save to Worksheet.
Joe
I just tested this on most recent version of Sql Dev
Joe