db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepak Abraham (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DERBY-4842) Support "IF [NOT] EXISTS" in CREATE TABLE and "IF EXISTS" in DROP TABLE
Date Thu, 23 Nov 2017 13:01:09 GMT

    [ 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:00 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 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 _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 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)

Mime
View raw message