Re: EXISTS syntax for SELECT INTO?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Mike. Luckily, I don¹t need the data if the table already exists so
that should work.

Tony


On 10/11/06 2:53 PM, "Mike Morris" <mike@xxxxxxxxxxxxxx> wrote:

> My advice:
> 
> Do a "drop table" first, ignoring any error that will result if it does not
> exist, then do the "select into". This is portable, too...
> 
>> > I have a script that creates a table copy using SELECT INTO, but I want it
>> > to check if the new table already exists first. Does SQL support the EXISTS
>> > keyword for SELECT INTO statements (I'm running PG7)?
>> > 
>> > If not, is there another way to do it in SQL? I'd rather not do it
>> > programmatically.
>> > 
>> > Thanks in advance,
>> > Tony
>> > 
> 
> 
> Mike Morris
> The Music Place
> 1617 Willowhurst Avenue
> San Jose, CA 95125
> (408) 445-ARTS (2787)
> ------------------------------------
>     Your Free Humorous Quote:
>         When asked the difference between a tax collector and a taxidermist:
>         'The taxidermist takes only your skin.'
>                     - Mark Twain
> ------------------------------------
> 



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux