db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George H <george....@gmail.com>
Subject Re: "create table if not exists" ?
Date Tue, 17 Mar 2009 13:37:51 GMT
I don't think it supports it according to
You may have to run a drop table line before every create table.
Either that or in your java code to catch an SQL exception and then
run the create table sql.
George H

On Tue, Mar 17, 2009 at 1:25 PM, bigblop <fedevaps@yahoo.dk> wrote:
> I have this line i a derby script:
> create table derbyDB(num int, addr varchar(40));
> But the second time I run the script I get:
> Table/View 'DERBYDB' already exists in Schema 'APP'. [SQL State=X0Y32, DB
> Errorcode=20000]
> In mySQL I could use IF NOT EXISTS like:
> create table if not exists derbyDB(num int, addr varchar(40));
> But I get an error when doing that with Derby. Is there something equivalent
> in derby to IF NOT EXISTS ?
> --
> View this message in context: http://www.nabble.com/%22create-table-if-not-exists%22---tp22558480p22558480.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.

View raw message