You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Adrian Tarau (JIRA)" <ji...@apache.org> on 2010/10/13 06:31:34 UTC

[jira] Created: (DERBY-4842) Support "IF [NOT] EXISTS" in CREATE TABLE and "IF EXISTS" in DROP TABLE

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


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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4842) Support "IF [NOT] EXISTS" in CREATE TABLE and "IF EXISTS" in DROP TABLE

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920533#action_12920533 ] 

Knut Anders Hatlen commented on DERBY-4842:
-------------------------------------------

PostgreSQL supports this syntax for DROP TABLE: http://www.postgresql.org/docs/9.0/static/sql-droptable.html
I couldn't find any mentioning of support for CREATE TABLE [IF NOT EXISTS], though.

> 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
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-4842) Support "IF [NOT] EXISTS" in CREATE TABLE and "IF EXISTS" in DROP TABLE

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920521#action_12920521 ] 

Rick Hillegas commented on DERBY-4842:
--------------------------------------

Thanks for the suggestion, Adrian. The MySQL 6.0 syntax for declaring a table is this:

CREATE TABLE [IF NOT EXISTS] tableName ...

and the MySQL syntax for removing a table is this:

DROP TABLE [IF EXISTS] tableName ...

These clauses are MySQL extensions which are not part of the ANSI/ISO SQL Standard. This functionality may be peculiar to MySQL: I can't find anything similar documented for Postgres, Oracle, or DB2.

> 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
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.