Re: SQL Developer - view DDL Formatting

From: Powell, Mark <mark.powell2_at_dxc.com>
Date: Tue, 25 Apr 2017 18:31:34 +0000
Message-ID: <CS1PR84MB0183143E3FA45F0FDE71A349CC1E0_at_CS1PR84MB0183.NAMPRD84.PROD.OUTLOOK.COM>



I am of the opinion that views should always have an attribute list since I have encountered views where the view column name does not match up to the select list column names. Nor should a new column added to a table automatically appear in any views defined on the table. The sensitivity of the column data has to be considered in relation to the purpose and audience of each view that references the table.

When the view is updated you can easily generate the view code from the RDBMS Dictionary or using DBMS_METADATA.

Mark Powell
Database Administration
(313) 592-5148



From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Fergal Taheny <ftaheny_at_gmail.com> Sent: Tuesday, April 25, 2017 2:23:13 PM To: Michael D O'Shea/Woodward Informatics Ltd Cc: oracle-l_at_freelists.org; jeff.d.smith_at_oracle.com Subject: Re: SQL Developer - view DDL Formatting

Thanks Michael,

Yes I know I can do that but I was hoping that SQL Developer database export would have the option as I use it to extract all my database objects to our source control repository - each object to a single file.

When I add a colum to a table typically there will be a view or views to update and it's just simpler if the views don't contain an attribute list. One less update to do. Laziness or efficiency? I'm not sure.

Regards,
Fergal

On 25 Apr 2017 15:38, "Michael D O'Shea/Woodward Informatics Ltd" <woodwardinformatics_at_strychnine.co.uk<mailto:woodwardinformatics_at_strychnine.co.uk>> wrote: Just a thought ...... if you wanted a copy of the unadulterated VIEW source code outside of SQL Developer, you could just query ALL_VIEWS ~
Mike

On 25 Apr 2017, at 15:59, Jeff Smith <jeff.d.smith_at_oracle.com<mailto:jeff.d.smith_at_oracle.com>> wrote:

I don’t think DBMS_METADATA offers a flag for that preference, so the short answer is ‘no.’

You could create a custom report though and build the DDL code yourself, and attach that as a tab in the View editor.

From: Fergal Taheny [mailto:ftaheny_at_gmail.com] Sent: Tuesday, April 25, 2017 9:51 AM
To: oracle-l_at_freelists.org<mailto:oracle-l_at_freelists.org> Subject: SQL Developer - view DDL Formatting

Hi,

When using “Database Export” in SQL Developer, does anyone know if there is a way get the DDL for views to look like this:

CREATE OR REPLACE VIEW “X” AS
select
  A,
  B,
  C
from
  D;

instead of this:

CREATE OR REPLACE VIEW “X” (“A”,”B”,”C”) AS select
A,
B,
  C
from
  D;

i.e. I don’t want the attribute list to appear.

Thanks,
Fergal

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Apr 25 2017 - 20:31:34 CEST

Original text of this message