Copy/paste between different applications are probably the most frequently used actions without necessarily being aware of it. DbVisualizer offers some useful copy/paste features that are outlined in this tips and tricks session.
The standard Copy Selection command (Ctrl+C, CMD+C) copies the selected cells in CSV text format based on the settings in Tool Properties / General / Grid. The default column delimiter is a tab (\t) and the row delimiter is a line feed (LF). These are the delimiters used by most external spreadsheet applications such as MS Excel.
This is the result when pasting in a text editor:
As you can see the data is not aligned in fixed columns. The reason for this is that a tab (\t) is used as a delimiter between the columns. This format is suitable for pasting in the table data editor in DbVisualizer or external applications such as MS Excel.
Copying Selection with Column Header
The Copy Selection with Column Header (Ctrl+H, CMD+H) is exactly the same as Copy Selection with the addition that grid column labels are the first row in the output.
Copying Selection as Formatted Text
The Copy Selection as Formatted Text (Ctrl+Alt+H, CMD+Alt+H) formats the columns as fixed width columns. This is format is suitable for reading using a monospaced font.
Drag BLOB/Binary and CLOB data to external applications
Copying BLOB/Binary and CLOB data is easy using drag and drop. Just select the cell(s) in DbVisualizer, drag, and then drop in the target application.
Copy external files to BLOB/Binary and CLOB data types in DbVisualizer
If an external application supports copying files, images, PDFs and other formats these can be pasted in the table data editor in DbVisualizer.
Next screenshot is the Image Viewer in Windows with 8 image files selected for copy.
To paste in DbVisualizer open a table with a binary column and paste in the binary cell (or multiple selected cells). New rows are created if needed.
Copy Selection as Comma List
This function copies the selected cells as a list to the system clipboard.
Example when all values are selected in the above example and then the right-click menu command Copy Selection as Comma list, the following is inserted in the system clipboard:
Copy Selection as IN clause
This function copies the selected cells as a SQL In clause to the system clipboard.
Example when all values are selected in the above example and then the right-click menu command Copy Selection as In clause, the following is copied to the system clipboard: