Delete all tables in Derby DB

后端 未结 10 1077
离开以前
离开以前 2020-12-30 05:42

How do i delete all the tables in the schema on Apache Derby DB using JDBC?

10条回答
  •  孤独总比滥情好
    2020-12-30 06:25

    Do a little method in java in which you execute a

    DROP TABLE [tablename]
    

    tablename is passed by parameter.

    And another method in which you loop over a record set formed by the query

    SELECT tablename FROM SYSTABLES
    

    calling the first method.

    Derby latest documentation

提交回复
热议问题