Firebird Question:

How to reorder the table columns (fields)?

Tweet Share WhatsApp

Answer:

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).

Download Firebird PDF Read All 44 Firebird Questions
Previous QuestionNext Question
How to recreate the index on a Firebird table?How to repair a corrupt Firebird database?