in navicat you can arrange the order of the columns but i have yet to find a way to sync the changes with the database. i saw a similar question here -> Rearrange column order in Sqlyog but haven't found anything similar in navicat. i have many tables that need to be fixed for export to excel and the order is important in the readability/presentation. typing out sql code for each move would be way too tedious. thanks in advance.
you can't do it in navicat , you have to run a sql query for that purpose
You can reorder columns using SQLyog. To change the sequence of columns in a table, select the table in the Object Browser and select Table -> More Table Operations -> Reorder Column(s) (Ctrl+Alt+R) from the popup menu.
Select any column and click Up or Down button to move the column up / down. Having re-sequenced the columns, click Re-Order to save the table with changed structure. The column data in the table gets re-arranged accordingly.
This is a really old question i Stumbled on going to answer just in case someone needs Navicat provides the ability to change the column order in a table by using the design table feature Either right click on the table name or press ctr-d on the top of the screen there are arrows to move a column up or down By pressing on the SQL preview tab on the top you can actually see the ALTER TABLE statements navicat is going to run You can also copy-paste this Statement and run on any other test database you may have or as a git migration Its a good idea to always read the SQL Preview as some times Navicat may use DROP statements and you would want to take a backup before something like that
© 2022 - 2024 — McMap. All rights reserved.