I want to add a column to preexisting table. Can I add it in between two existing columns? I am working on phpmyadmin.
相关问题
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
- mySQL alter table on update, current timestamp
You want something like:
I think this video can help you. With PHPMyAdmin
You can also do it via plain SQL, with a
ALTER TABLE
query:Use the add new column after dropdown.
Select the database from the menu on the left.
Select the table by clicking on it's title column hyperlink.
Check the add new column after radio button and select the column you want to insert after in the drop down.
Click Add.
This video goes through the process http://www.youtube.com/watch?v=jZ72GCGWPQg
Even if you have inserted a column in the MySQL, MySQL now provides an option to click on 'move columns' button below the table.
Yes, you can do that. See a "after" list box in the section. you can select after which field your new field need to be added.
The ordering of columns in MySQL isn't of much importance. As for adding a new column,
The
AFTER
clause defines the position where your new column will come.