Ask Your Question

How to insert a field for desired order of (Firebird) Base structure

asked 2019-06-24 17:20:48 +0100

lonk gravatar image

updated 2019-06-24 17:22:05 +0100

I am using Fedora 30 Workstation + KDE Plasma Desktop Environment + LO / Base with Firebird embedded.

I'd like to insert a field but Base allows only the last order for it.

I have just migrated to LO Base. Can you please teach me how to insert into the desired order?

edit retag flag offensive close merge delete


I'm assuming you mean inserting a record and not a field, right? Where do you want to insert, table, query, form? If form, what is the basis of the form, table or query? If I am wrong with my questions, you should edit your question and add more detailed information, thank you.

ebot gravatar imageebot ( 2019-06-24 17:26:58 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-06-24 17:53:31 +0100

Ratslinger gravatar image

updated 2019-06-24 17:54:35 +0100


Typically there is no need to have a field in a specific location within a table. In more elaborate systems this may be a concern but not for average use. Still many prefer this for aesthetic reasons. You can do this with SQL. Add your new field to the end of the table. Then from the main Base screen under menu item Tools->SQL you can run a statement to position the field where wanted. Here is the method:

Change Table Column Position

Syntax: ALTER TABLE tablename ALTER [COLUMN] colname POSITION <newpos>

Example: ALTER TABLE salary_history2 ALTER old_salary POSITION 2

From Firebird documentation:

The POSITION keyword changes the position of an existing column in the notional “left-to-right” layout of the record. Numbering of column positions starts at 1.

• If a position less than 1 is specified, an error message will be returned

• If a position number is greater than the number of columns in the table, its new position will be adjusted silently to match the number of columns.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-06-24 17:20:48 +0100

Seen: 39 times

Last updated: Jun 24