FIREBIRD Questions and Answers

How to reorder the table columns (fields)?

While the order should not matter to applications (you should always use explicit column names in queries), perhaps it’s easier for you when you work with tables in database administration tools. You can move a column to different location using the following SQL statement:
ALTER TABLE table_name ALTER field name POSITION new_position:
Positions are numbered from one. If you wish to exchange two fields, make sure you run the statement for both of them. It’s easy to run tools like FlameRobin to do this (Reorder Fields option at table’s properties screen).