Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Truncate table in DBeaver right click menu/GUI

Tags:

dbeaver

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?

like image 852
Alok Thampi Avatar asked May 23 '19 12:05

Alok Thampi


People also ask

How do I delete a table in DBeaver?

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.

What is the procedure for truncating a table?

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.

How do you edit a table in DBeaver?

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.

How do I truncate a table in PostgreSQL?

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.


2 Answers

In DBeaver 7.2.4 - Right click on a table, that needs to be truncated, choose Tools->Truncate, click 'Start'. That's all.

enter image description here

like image 128
Volex Avatar answered Oct 21 '22 06:10

Volex


This feature is not yet available for SQL Server. May be DBeaver will include this in their new versions.

like image 1
RadAl Avatar answered Oct 21 '22 06:10

RadAl