| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Carsten H. Pedersen | Date: | October 6 1999 1:16pm |
| Subject: | Re: TABLE EXISTS | ||
| View as plain text | |||
sinisa@stripped wrote: > > toxalot@stripped writes: > > I see in the handbook that there is a way to see that a table exists before > > dropping it, but how do you check if one exists before trying to create it? > > > > Jennifer > > Hi! > > IF EXISTS works with DROP and CREATE, with a later being rather > recent. > > Sinisa Alternatively, you can do "select 1 from <tablename>". You either get a result set of one record containing a 1 or an error indicating the table doesn't exist. / Carsten
| Thread | ||
|---|---|---|
| • TABLE EXISTS | toxalot | 6 Oct |
| • Re: TABLE EXISTS | sinisa | 6 Oct |
| • Re: TABLE EXISTS | Carsten H. Pedersen | 6 Oct |
| • Re: TABLE EXISTS | Paul DuBois | 6 Oct |
| • Re: TABLE EXISTS | toxalot | 7 Oct |
