I am developing a windows application and using Postgres as backend database. At some point in my application i am dynamically creating table e.g Ta开发者_如何学Cble1, then Table2 and so on. In this way i have many dynamic table in my database. Now i provide a button "Clean Database", so i need to remove all those dynamic tables using SQL query. Should some one guide me how to write SQL Query that automatically delete all such tables?
You should just be able to say
DROP TABLE {tablename}
for each dynamically created table. Try that and see if it works.
精彩评论