DBeaver Reorder Columns: Display, Query, Table and Export Options
How column reordering works in DBeaver: grid display order versus query order, physical table changes by database, and column order in CSV exports and copied text.
"Reordering columns in DBeaver" can mean four different operations. It can mean rearranging how a result grid looks, changing the order of a query's output, changing a table's stored column order in the database, or controlling the column order of an exported or copied delimited file. These operations differ in what they change, who sees the change and how easily it can be undone. This review separates them so you can pick the one that fits your purpose.
Short answer: which approach suits your use
For viewing or reviewing data, rearrange the result grid or write the columns in the order you want in your SELECT statement. Both are low risk and leave the table untouched. If other people or applications need a consistent order, a view is usually safer than altering the table. Change the physical column order only when your database supports it cleanly and you have checked what depends on the table, because on several systems this means rebuilding the table. If you are sharing data outside DBeaver, a plain delimited file with a header row and an explicitly chosen column order is the most portable result.
What each kind of reordering actually changes
The key distinction is between presentation and stored structure. Moving a column in the grid changes only how DBeaver displays the result. Reordering a SELECT list changes the result your query returns, but the table stays the same. A physical reorder changes the table definition, which affects every tool that relies on column position. No approach alters the characters inside the values. Unlike text styling or reversal, reordering columns does not create encoding or reading-order problems within cells. The risk is structural: data can end up in the wrong place if something reads it by position.
| Approach | What changes | Where the change lives | Affects other users or applications |
| Dragging column headers in the result grid | Display order in that viewer | DBeaver only; not written to the database | No |
| Reordering the SELECT list | Column order of the query result | Your script or saved query | No |
| Creating a view with the desired order | Order seen by anyone querying the view | Stored in the database as a view definition | Yes, for consumers of the view |
| Physically reordering table columns | Ordinal position in the table definition | Stored in the database | Yes: affects SELECT *, INSERT statements without a column list, and positional exports |
| Choosing column order for an export | Column order in the output file | The exported file | Yes, for recipients of the file |
Rearranging columns in the result grid
DBeaver's data viewer generally lets you drag a column header to a new position, which suits ad hoc inspection. This is a presentation change only. The supplied evidence does not confirm whether a rearranged layout persists between sessions, how it interacts with re-running the query, or exact menu names for column visibility options. These details can vary by version, so check them in your installation instead of assuming them.
Changing the order in the query
The most predictable way to control column order is to list columns explicitly. This works the same on every database, needs no special privileges and carries through to any export based on that query.
SELECT last_name,
first_name,
email,
id
FROM customers;
Changing the physical column order in a table
Relational databases generally treat column position as insignificant, and support for changing it varies by engine. DBeaver sends SQL to whichever database you are connected to, so what is possible depends on that database, not on DBeaver.
- MySQL and MariaDB: ALTER TABLE with MODIFY COLUMN or CHANGE COLUMN accepts FIRST or AFTER. You must restate the full column definition, or attributes such as NOT NULL or defaults may be lost. On large tables, this operation may rebuild the table.
- PostgreSQL: There is no command to move a column. The options are recreating the table and copying the data, or presenting the desired order through a view.
- SQL Server: T-SQL has no syntax for moving a column. Graphical designers that offer reordering achieve it by recreating the table.
- Oracle: There is no direct reorder command. In versions with invisible columns, making a column invisible and then visible again moves it to the last position. Moving several columns this way changes their order.
- SQLite: Reordering requires creating a new table, copying the data and renaming it.
-- MySQL / MariaDB: restate the full definition when moving a column
ALTER TABLE customers
MODIFY COLUMN email VARCHAR(255) NOT NULL AFTER last_name;
On databases that cannot move columns, a view gives consumers a fixed order without touching the underlying table:
-- PostgreSQL and others: present a fixed order without altering the table
CREATE VIEW customers_ordered AS
SELECT id, last_name, first_name, email
FROM customers;
If you rebuild a table to change its column order, the new table must reproduce the original's constraints, indexes, defaults, triggers, permissions and foreign keys. A quick CREATE TABLE AS SELECT does not carry most of these over. Views, functions and application code that refer to the old table may also need attention. The supplied evidence does not confirm whether DBeaver's table editor offers a column-reorder control for a given driver. If your version generates a change script before applying edits, read that script to see whether it runs a simple ALTER or a full table rebuild.
Column order in delimited exports and copied text
When the goal is a CSV or other delimited file, the dependable method is to write a SELECT with the columns in the required order and export that result. The output order then follows the query rather than any on-screen arrangement. The supplied evidence does not establish whether DBeaver's export honors a dragged grid layout, so treat that as something to test. Check the header row of the output file before relying on it.
Copying cells from the grid and pasting them elsewhere typically produces delimited plain text. DBeaver also offers an advanced copy option with settings such as delimiter and header inclusion. Exact options, and whether the copied text follows the displayed column order, should be checked in your version. Pasting into a spreadsheet or text editor and comparing the header row against the grid is a quick, scoped test.
Will the result stay readable and usable after sharing?
Because reordering leaves the characters in each value unchanged, copied or exported data stays searchable and editable like any other plain text. Screen readers and other tools read it in the order the columns appear in the file. The main compatibility risk comes from positional consumers. Import scripts, spreadsheet formulas or applications that expect column three to be a particular field will silently misread data if the order changes. A header row and explicit column names in queries and INSERT statements reduce this risk. The supplied evidence includes no documentation or tests on how DBeaver's own grid works with assistive technology. If accessibility matters for recipients, a plain delimited file with a clear header row is the safer form to share.
- Decide whether you need a display change, a query change, a view or a structural change.
- Prefer explicit column lists over SELECT * wherever order matters.
- Before altering a table, check dependent views, code and positional imports.
- For exports, define the order in the query and verify the header row in the output.
- Keep a header row in any shared delimited file.
Evidence gaps
No version-specific documentation or test results were supplied for this review. The descriptions of DBeaver's grid, export and copy behavior are therefore general. Persistence of grid layouts, exact menu labels, export handling of on-screen order and per-driver table editor capabilities are unconfirmed. Verify them in your own installation before relying on them. The database-level behavior described above reflects each engine's general SQL capabilities. Check your database version's documentation before running structural changes.