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!

Minor Bug? DDL generated when making an existing column virtual

Mint-InnitMar 12 2019 — edited May 1 2019

Hi, I think this is a bug in versions up to and including:

Version 18.3.0.277

Build 277.2354

The DDL generated when altering a column to become virtual is incorrect. e.g.

Simple table

CREATE TABLE "TEST_TABLE"

   (    "COLUMN1" NUMBER,

    "COLUMN2" NUMBER

   ) ;

  • Edit table in SQL Developer
  • Select column 2
  • click Data Type in edit dialog to expand column details
  • change to Virtual with expression e.g.  COLUMN1 * 100
  • Click DDL in tree view

SQL Developer has generated the following DDL:

ALTER TABLE TEST_TABLE DROP COLUMN COLUMN2;

ALTER TABLE TEST_TABLE MODIFY ( COLUMN2 AS ( column1 * 100 ) VIRTUAL );

ALTER TABLE TEST_TABLE ADD (COLUMN2 AS ( column1 * 100 ) VIRTUAL );

Clicking OK fails at statement 2 of course. Clearing the error dialog and clicking OK again then works. So I guess the modify shouldn't be there.

Cheers.

Comments

Post Details

Added on Mar 12 2019
4 comments
229 views