Обсуждение: How to delete a table in Postgres ???
Does anyone know how to delete a table in postgresql??? I have tried all the usual commands like: delete <tablename>; del <tablename>; del table <tablename>; delete table <tablename>; Can anyone help?? Regards Sarwar
Try "DROP TABLE <tablename>". 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 <tablename>; > del <tablename>; > del table <tablename>; > delete table <tablename>; > > 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
Hello Sarwar, try: drop <tablename> Regards Lutz On Fri, 27 Apr 2001 12:57:50 +0100 "suhail sarwar" <sarwar@postmaster.co.uk> wrote: > Does anyone know how to delete a table in postgresql??? > > I have tried all the usual commands like: > delete <tablename>; > del <tablename>; > del table <tablename>; > delete table <tablename>; > > 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
In accordance with SQL92: drop table <tablename>; jeff suhail sarwar wrote: > Does anyone know how to delete a table in postgresql??? > > I have tried all the usual commands like: > delete <tablename>; > del <tablename>; > del table <tablename>; > delete table <tablename>; > > 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
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 <tablename>; > del <tablename>; > del table <tablename>; > delete table <tablename>; > > 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!" -----------------------------------------------------------------------------
You should use drop <tablename> ; 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 <tablename>; > del <tablename>; > del table <tablename>; > delete table <tablename>; > > 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
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 <tablename>; > del <tablename>; > del table <tablename>; > delete table <tablename>; > > Can anyone help?? \h in psql shows "DROP TABLE xxx". Please read the FAQs, or at least the man page for psql. -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
On Fri, 27 Apr 2001, suhail sarwar wrote: > Does anyone know how to delete a table in postgresql??? Standard SQL is DROP TABLE <table name> -- Brett http://www.chapelperilous.net/btfwk/ ------------------------------------------------------------------------ Nothing will ever be attempted if all possible objections must be first overcome. -- Dr. Johnson
On Fri, 27 Apr 2001, suhail sarwar wrote: > Does anyone know how to delete a table in postgresql??? > DROP TABLE <tablename> You also will need to drop the sequence if you plan to use the same table name again. DROP SEQUENCE <sequencename> 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