2

in QGIS 2.18 I used the table manager plugin for renaming or removing columns in a table. This plugin doesn´t exist in QGIS 3.4.1.

Is there any other plugin or way to rename, remove or order columns in the attribute table of a vector layer?

1

2 Answers 2

7

Try the Refactor Fields tool in the processing toolbox.

You can rename, reorder, and change the types of the fields. You can also import fields from other layers and map the old fields to the new fields.

It creates a new layer but if you want you can just save over the original.

2
  • Thank you! Is it possible to save over the original directly in the refactor fields tool? I export the virtual layer and save it over the original file. Then I reload the original file and then I can see the changes.
    – joe_gerner
    Commented Apr 17, 2019 at 13:06
  • 1
    @joe_gerner - Not from within the tool. And it can be bad practice to do that anyway as you may lose a lot of the original data if it doesn't work as intended. The safer option is to create a new file and then change the source of the layers in your project so they point at the new file instead of the original (which you should keep at least for a while until you are sure you don't need it). Commented Apr 17, 2019 at 13:09
1

I find the easiest way is to edit via DB Manager (if the layer is in a geopackage for example).

  1. Make a connection to the database via DB Manager
  2. Click on the layer within the database
  3. In the top menu, click on Table/Edit Table.
  4. Under columns, edit the appropriate column/field. (you can also change the type of field if required)
  5. Save

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.