Re: DROP TABLE IF EXISTS
От | Jaime Casanova |
---|---|
Тема | Re: DROP TABLE IF EXISTS |
Дата | |
Msg-id | 20041026205134.34093.qmail@web50004.mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: DROP TABLE IF EXISTS (William Yu <wyu@talisys.com>) |
Ответы |
Re: DROP TABLE IF EXISTS
|
Список | pgsql-novice |
--- William Yu <wyu@talisys.com> escribió: > I'm not sure why this even matters. You do DROP > TABLE on a table that > doesn't exist, all that will happen is that you will > get an error back > but your program will continue on it's merry way > anyways. The only thing > IF EXISTS would give you is the suppression of the > error message. > > > Steven Klassen wrote: > > > * Sean Davis <sdavis2@mail.nih.gov> [2004-10-21 > 12:26:47 -0400]: > > > > > >>I am wondering how to do this simple mysql task in > postgres. Any > >>hints? > > > > > > This reply from Ron Johnson seems to suffice: > > > > > http://archives.postgresql.org/pgsql-interfaces/2002-05/msg00102.php what about the Ron Johnson solution? if exists (select 1 from pg_tables where tablename = "thetable") > drop table thetable regards, Jaime Casanova _________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com
В списке pgsql-novice по дате отправления: