In a LibreOffice Base document, the sequence of fields in a table definition is important[0].

But when I ask the “Table Design” dialogue to insert a field, or to paste a row from the clipboard, it insists on placing the new field at the end.

I'm using LibreOffice

How can I place a new field at the position I select? How can I re-order the fields in Table Design?

[0] I'm aware that in a truly relational database the fields have no special sequence. But in a Base database, sequence of fields is maintained, and is important in presentation of those fields within the Base application.


I know of no means to do what you want using the table design dialog in OpenOffice/LibreOffice. The method below has been recommended on several forums for re-ordering fields in a table using the embedded database. If your table is referenced by constraints or views, then they must be deleted and rebuilt along with any relationships.

Copy the table, then choose Paste Special and choose Data source table as the type to paste. Choose to copy Definitions and data. In the Apply Columns dialog that follows, transfer the existing columns to the new table in the order you wish. After the table is created to your satisfaction, delete your original table and rename the new table with the original name.

| improve this answer | |

Well, I accidentally solved that problem, by making a "copy" -> "paste special" of the "table" I wanted to rearrange. Then When it asked me how I wanted it copied, I chose "Data source table" -> "as Table View" and then I got a "table2" file which I could "edit" or "edit in SQL view" (I chose the second) and it accepted the reordering of the fields, as I wanted. In the end I just deleted the original "table" file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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