[
https://issues.apache.org/jira/browse/DERBY-4842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265485#comment-16265485
]
Lukas Eder commented on DERBY-4842:
-----------------------------------
In many years of working with SQL, I have never felt the need of using CREATE
OR REPLACE with "data objects", such as tables. However, indeed, when working
with "program objects", such as views, procedures, functions, packages, it is
very useful - in fact more useful than IF NOT EXISTS, because usually there's a
new version involved that I want to apply to the database regardless if the
object exists.
With data objects, this is different. IF [ NOT ] EXISTS is super powerful,
because migration scripts tend to:
- be very hard to write in a correct way
- crash in the middle. With IF [ NOT ] EXISTS, they can often be simply re-run,
in case the database doesn't support transactional DDL
> Support "IF [NOT] EXISTS" in CREATE TABLE and "IF EXISTS" in DROP TABLE
> -------------------------------------------------------------------------
>
> Key: DERBY-4842
> URL: https://issues.apache.org/jira/browse/DERBY-4842
> Project: Derby
> Issue Type: Improvement
> Components: SQL
> Reporter: Adrian Tarau
> Labels: derby_triage10_10
>
> It would be really great if Derby will support these additions similar with
> what MySQL has.
> Also a way to disable constraints when dropping the whole database, so you
> would not be forced to put DROPs in such an order that constraints will not
> fail.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)