How to rename a column in Postgresql database table in Dbeaver.

RENAME COLUMN

It can usually happen that you need to change an existing column in a database table. Possibly due to a new requirement, a typing error made when creating a new table, or the addition of a new column in a database table. You can make use of the options listed below if you need to modify an existing column.

RENAME COLUMN USING GUI IN DBEAVER

Select and expand the database, schema, table, and column choices in the left tree menu.
Choose the existing column you want to rename by performing a right-click on it in the enlarged column menu. Right-clicking causes a menu to display; from there, choose the rename column option.
A popup displaying the name of the current table will appear once you have chosen the option.
You can now choose OK after renaming the table and deleting its previous name.
Once you click OK, a new pop-up window will appear in which you can select Persist and change the name of your column.

RENAME COLUMN USING SQL COMMAND

The RENAME keyword is used in combination with the ALTER TABLE command to rename a column in a table.

-- Syntax
ALTER TABLE schema_name.table_name RENAME COLUMN existing_column_name TO new_column_name;

-- Example
ALTER TABLE public.students_backup RENAME COLUMN student_full_name to student_name;