Delete all tables in Derby DB

后端 未结 10 1053
离开以前
离开以前 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:21

    If you're working from the command prompt rather than through JDBC, this should get you started.

    SELECT 'DROP TABLE ' || schemaname ||'.' || tablename || ';'
    FROM SYS.SYSTABLES
    INNER JOIN SYS.SYSSCHEMAS ON SYS.SYSTABLES.SCHEMAID = SYS.SYSSCHEMAS.SCHEMAID
    ;
    

提交回复
热议问题