Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make a column as first column in MySQL?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 275
    Comment on it

    Sometimes we need to make existing column as first column. For example you created a table and added column "id" after creating the column. Now you want to make "id" column as first column, then you can do this easily by using ALTER command as below:

    ALTER TABLE cities CHANGE id id INT(11) NOT NULL FIRST
    

    after running above query, "id" column will become first column of "cities" table.

    Hope this will help you :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: