How to delete a table in Postgres ???

Поиск
Список
Период
Сортировка
Искать

How to delete a table in Postgres ???

От:
"suhail sarwar" <sarwar@postmaster.co.uk>
Дата:
Does anyone know how to delete a table in postgresql???

I have tried all the usual commands like:
delete ;
del ;
del table ;
delete table ;

Can anyone help??

Regards

Sarwar

Re: How to delete a table in Postgres ???

От:
"Poul L. Christiansen" <poulc@cs.auc.dk>
Дата:
Try "DROP TABLE ".

Poul L. Christiansen

suhail sarwar wrote:
> 
> Does anyone know how to delete a table in postgresql???
> 
> I have tried all the usual commands like:
> delete ;
> del ;
> del table ;
> delete table ;
> 
> Can anyone help??
> 
> Regards
> 
> Sarwar
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: How to delete a table in Postgres ???

От:
Lutz Steinborn <l.steinborn@4c-ag.de>
Дата:
Hello Sarwar,

try:
drop 

Regards
Lutz

On Fri, 27 Apr 2001 12:57:50 +0100
"suhail sarwar"  wrote:

> Does anyone know how to delete a table in postgresql???
> 
> I have tried all the usual commands like:
> delete ;
> del ;
> del table ;
> delete table ;
> 
> Can anyone help??
> 
> Regards
> 
> Sarwar
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: How to delete a table in Postgres ???

От:
Jeff Daugherty <jdaugherty@greatbridge.com>
Дата:
In accordance with SQL92:
drop table ;

jeff

suhail sarwar wrote:

> Does anyone know how to delete a table in postgresql???
> 
> I have tried all the usual commands like:
> delete ;
> del ;
> del table ;
> delete table ;
> 
> Can anyone help??
> 
> Regards
> 
> Sarwar
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: How to delete a table in Postgres ???

От:
"D. Duccini" <duccini@backpack.com>
Дата:

drop table


On Fri, 27 Apr 2001, suhail sarwar wrote:

> Does anyone know how to delete a table in postgresql???
> 
> I have tried all the usual commands like:
> delete ;
> del ;
> del table ;
> delete table ;
> 
> Can anyone help??
> 
> Regards
> 
> Sarwar
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
> 


-----------------------------------------------------------------------------
david@backpack.com            BackPack Software, Inc.        www.backpack.com
+1 651.645.7550 voice       "Life is an Adventure.    
+1 651.645.9798 fax            Don't forget your BackPack!"   
-----------------------------------------------------------------------------

Re: How to delete a table in Postgres ???

От:
Johan Daine <isis@wanadoo.be>
Дата:
You should use 
	drop  ; 
instead
Johan Daine
suhail sarwar a écrit :
> 
> Does anyone know how to delete a table in postgresql???
> 
> I have tried all the usual commands like:
> delete ;
> del ;
> del table ;
> delete table ;
> 
> Can anyone help??
> 
> Regards
> 
> Sarwar
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: How to delete a table in Postgres ???

От:
Joel Burton <jburton@scw.org>
Дата:
On Fri, 27 Apr 2001, suhail sarwar wrote:

> Does anyone know how to delete a table in postgresql???
> 
> I have tried all the usual commands like:
> delete ;
> del ;
> del table ;
> delete table ;
> 
> Can anyone help??

\h in psql shows "DROP TABLE xxx".

Please read the FAQs, or at least the man page for psql.

-- 
Joel Burton   
Director of Information Systems, Support Center of Washington

Re: How to delete a table in Postgres ???

От:
"Brett W. McCoy" <bmccoy@chapelperilous.net>
Дата:
On Fri, 27 Apr 2001, suhail sarwar wrote:

> Does anyone know how to delete a table in postgresql???

Standard SQL is DROP TABLE 

-- Brett

				   http://www.chapelperilous.net/btfwk/
------------------------------------------------------------------------
Nothing will ever be attempted if all possible objections must be first
overcome.
		-- Dr. Johnson

Re: How to delete a table in Postgres ???

От:
Jeff Self <jself@greatbridge.com>
Дата:
On Fri, 27 Apr 2001, suhail sarwar wrote:

> Does anyone know how to delete a table in postgresql???
>
DROP TABLE 

You also will need to drop the sequence if you plan to use the same table
name again.
 DROP SEQUENCE 
You can find the sequence name by issuing the \d command in psql.
-- 
Jeff Self
Information Specialist
Great Bridge, LLC
www.greatbridge.com | www.greatbridge.org
Norfolk, VA
(757)233-5570
jeff.self@greatbridge.com

FAQ