move column

Posted on 2009-02-15
Last Modified: 2012-05-06
hello there,
I have one table in mysql and its like this


is it possible to move userID at the top of title using phpmyadmin?
Question by:XK8ER
    LVL 26

    Expert Comment

    Try this..
    ALTER TABLE table_name MODIFY userID column_type(width) FIRST;

    Open in new window

    LVL 26

    Accepted Solution

    column_type(width)  > check the column defintion and put as it is.

    Here is TestCase

    show create table table_name;
     CREATE TABLE `table_name` (             
                  `id` int(11) DEFAULT NULL,            
                  `hello` varchar(50) DEFAULT NULL      
    Now I'd move column hello to FIRST as
    ALTER TABLE table_name MODIFY hello varchar(50) FIRST;
    show create table table_name;
    CREATE TABLE `table_name` (
      `hello` varchar(50) DEFAULT NULL,
      `id` int(11) DEFAULT NULL

    Open in new window

    LVL 26

    Expert Comment

    You can run the ALTER statement in phpmyadmin's SQL query window(make sure DB name is selected in left pane)... or you can use any GUI client to run the statement.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Creating and Managing Databases with phpMyAdmin in cPanel.
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now