Sqlitebrowser: Select multiple tables for deletion?

Created on 30 Sep 2017  路  2Comments  路  Source: sqlitebrowser/sqlitebrowser

Details for the issue

Our recent support for importing multiple CSV tables has revealed an interesting problem.

It doesn't seem possible at the moment to select multiple tables (nor indexes) in the DB Structure
tab. Deleting several hundred tables using the GUI looks challenging. :wink:
screen shot 2017-09-30 at 12 56 35
We should probably add support for selecting multiple table entries, even if it's just for the delete action.

Not sure if this would be tricky, easy, etc. Some possible interaction points in the code spring to mind when multiple tables are selected:

  • Might need to disable the "Modify table" button, right click context menu entry, and Edit menu entry
  • When switching to the Browse Data tab, we'd probably want to use the first of the selected entries as the table to switch to

There might be others, but those two spring to mind. :smile:

Useful extra information

I'm opening this issue because:

  • [x] DB4S needs a feature

I'm using DB4S on:

  • [x] Mac OS: ( _version:_ 10.11.6 )

I'm using DB4S version:

  • [x] Other: latest git master

I have also:

enhancement

Most helpful comment

Just FYI: while some "select tables to delete" functionality is still missing, you could use the manual SQL tab to do something like this:

SELECT 'DROP TABLE "' || name || '"' FROM sqlite_master;

This should give a list of all table names. Now go in a text editor, remove the table you dont want to delete from your db from this list, paste the list of drop tables into another sql field and go.

All 2 comments

Just FYI: while some "select tables to delete" functionality is still missing, you could use the manual SQL tab to do something like this:

SELECT 'DROP TABLE "' || name || '"' FROM sqlite_master;

This should give a list of all table names. Now go in a text editor, remove the table you dont want to delete from your db from this list, paste the list of drop tables into another sql field and go.

Good thinking. That sounds like it'd do the trick. :smile:

Was this page helpful?
0 / 5 - 0 ratings