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