[
https://issues.apache.org/jira/browse/DERBY-4842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16264291#comment-16264291
]
Deepak Abraham edited comment on DERBY-4842 at 11/23/17 1:02 PM:
-----------------------------------------------------------------
SQL standard or not - please lets not wait for the standard to become up to
date - this feature would be really useful especially while testing when all
the statements are in a .sql file which is executed en-masse via plain JDBC or
via a framework.
Typically before the _create table_ statement a _drop table if exists
<table-name>_ could be there or the create could have an _if exists_. This
makes running the same test repeatedly which
* drops and re-creates the table, (via an sql file)
* inserts some data (via same sql file)
* does some db testing (via sql file or manual JDBC queries)
All very easy. Otherwise the drop statement has to be put in java code, which
is quite painful.
was (Author: deepakab):
SQL standard or not - please lets not wait for the standard to become up to
date - this feature would be really useful especially while testing when all
the statements are in a .sql file which is executed en-masse via plain JDBC or
via a framework.
Typically before the _create table_ statement a _drop table if exists
<table-name _ could be there or the create could have an _if exists_. This
makes running the same test which
* drops and re-creates the table, (via an sql file)
* inserts some data (via same sql file)
* does some db testing (via sql file or manual JDBC queries)
All very easy. Otherwise the drop statement has to be put in java code, which
is quite painful.
> 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)