Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
MYSQL: Changing Column Name
Results 1 to 5 of 5

Thread: MYSQL: Changing Column Name

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    417

    MYSQL: Changing Column Name

    Hi,

    How do you change a column's name in MYSQL?

    thanx

  2. #2

    Re:MYSQL: Changing Column Name

    ALTER TABLE table_name CHANGE old_col_name create_definition

    create_definition is just like when you use CREATE .

    example: col1 INT or col2 VARCHAR(20)

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    417

    Re:MYSQL: Changing Column Name

    Where do you specify the NEW_name

    if I have a db called 'testdb' and a table called 'testtable' with 'testcolumn' of def var(20)

    ALTER TABLE testtable CHANGE testcolumn var(20);

    I want to change the name to new_column. where?

    thanx

  4. #4
    Advisor
    Join Date
    Apr 2002
    Posts
    858

    Re:MYSQL: Changing Column Name

    http://www.mysql.com/documentation/m...ter/index.html aoughta have all the info you need.

  5. #5
    alter table table_name change old_name new_name datatype(length)

    For more details: http://www.phponwebsites.com/2013/12...lumn-name.html

Similar Threads

  1. seperate column
    By svar in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 07-19-2011, 06:26 PM
  2. Problem starting mysql conflicts with the RPM "mysql-5.0.27-1.fc6"
    By kamakshiganesh in forum Redhat / Fedora
    Replies: 2
    Last Post: 10-26-2007, 04:35 AM
  3. Changing Name Fields
    By stevan in forum Windows - General Topics
    Replies: 0
    Last Post: 06-22-2005, 07:28 PM
  4. Changing name of the computer:
    By shebang in forum Linux - General Topics
    Replies: 20
    Last Post: 06-02-2004, 05:53 PM
  5. Changing from XDM
    By mmiller9 in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 03-10-2003, 12:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •