db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sanford <mzsanf...@aol.com>
Subject Re: Equivalent of SQL "DROP TABLE IF EXISTS MY_TABLE" ?
Date Mon, 26 Sep 2005 13:52:10 GMT

    I agree exists in the DDL would be nice, but I am also a long-time 
Sybase user. In the mean time, for my code I am doing a select from 
SYS.SYSTABLES to check for existence. Something like :

    select count(*) from SYS.SYSTABLES where TABLENAME = 'MY_TABLE'

    The only thing that goofed me up was the MY_TABLE is in all caps 
even if not created that way. Unfortunately, this does not work in the 
SQL-only ant environment you described.

  -- Matt Sanford

wolfgang127us@yahoo.co.jp wrote:

>Hi there,
>Thank you guys for the advice.
>I just wanted to prepare a file having those SQL statements and 
>process it using ANT, but now I gotta implement it programmatically..
>Can you guys put this functionality in wishlist ???
>Thanks anyways !
> For All Sports Fans!
> http://pr.mail.yahoo.co.jp/yells/

View raw message