Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Column to be modified to NOT NULL is already NOT NULL

Davide LenzaApr 17 2014 — edited Apr 17 2014

Good Morning,

I'm using SQL Developer to manage my DB and I have some problems with the export function because it produces a script separating NOT NULL constraints from CREATE instructions.

The NOT NULL constraints are specified inside ALTER TABLE instructions.

For example:

CREATE TABLE "BASIC_APP_APPLICATION"

   (

  "ID" NUMBER(13,0) GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1000 CACHE 20 NOORDER  NOCYCLE ,

  "CODE" CHAR(10 BYTE)

   )

  SEGMENT CREATION IMMEDIATE

  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255

NOCOMPRESS LOGGING

  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)

  TABLESPACE "SYSTEM" ;

  ALTER TABLE "DBDEVELOPER"."BASIC_APP_APPLICATION" MODIFY ("ID" NOT NULL ENABLE);

  ALTER TABLE "DBDEVELOPER"."BASIC_APP_APPLICATION" MODIFY ("CODE" NOT NULL ENABLE);

  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS

  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645

  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1

  BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)

  TABLESPACE "SYSTEM"  ENABLE;

This behaviour causes the "column to be modified to NOT NULL is already NOT NULL" error when the red instruction is performed.

How could I solve this problem?

Is it possibile with SQL Developer to obtain a script SQL like the following?

CREATE TABLE BASIC_APP_APPLICATION

(

  ID NUMERIC(13, 0) GENERATED BY DEFAULT AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1000 CACHE 20 NOORDER  NOCYCLE NOT NULL,

  CODE CHAR(10) NOT NULL

);


Thanks a lot.

Bye

Davide


Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 15 2014
Added on Apr 17 2014
5 comments
3,615 views