I am trying to find an option to truncate table in the right click menu or somewhere in the GUI of DBeaver. The database is SQL Server.
Is there any other option rather that explicitly writing the truncate script?
My preferred way is to use DBeaver. Here, you can open a schema, view the tables, interactively select which ones you want to delete, and right-click > delete the tables. This is a safe way to accomplish a bulk delete.
TRUNCATE TABLE removes all rows from a table, but the table structure and its columns, constraints, indexes, and so on remain. To remove the table definition in addition to its data, use the DROP TABLE statement.
Right-click the cell and click Edit cell on the context menu. Click the cell to set focus to it and press Shift+Enter or click the Edit cell value in separate dialog/editor button ( ) in the bottom toolbar.
The PostgreSQL TRUNCATE TABLE command is used to delete complete data from an existing table. You can also use DROP TABLE command to delete complete table but it would remove complete table structure from the database and you would need to re-create this table once again if you wish to store some data.
In DBeaver 7.2.4 - Right click on a table, that needs to be truncated, choose Tools->Truncate, click 'Start'. That's all.
This feature is not yet available for SQL Server. May be DBeaver will include this in their new versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With