Thread: change datatype

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Hong Kong
    Posts
    24
    Rep Power
    0
    I have already assigned a DATATYPE
    eg.

    userid VARCHAR(20)

    now, I want to change it to VARCHAR(40)

    what should i type in MySQL?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    16
    ALTER table table_name
    MODIFY userid varchar(40);
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Toronto, Canada
    Posts
    13
    Rep Power
    0
    alter table TABLENAME change column userid varchar(40)

    something like that. check the manual for correct syntax...

Similar Threads

  1. why would anyone need to change hostname?
    By x51 in forum Linux Help
    Replies: 5
    Last Post: August 26th, 2003, 11:13 AM
  2. match emails and change a field
    By TerroX in forum MySQL Help
    Replies: 2
    Last Post: July 17th, 2003, 05:18 AM
  3. how to change properties of a css class
    By clam61 in forum CSS Help
    Replies: 6
    Last Post: May 16th, 2003, 09:46 PM
  4. cgi scritp to run as suid to change Unix password
    By jazzzac in forum Perl Programming
    Replies: 1
    Last Post: May 1st, 2003, 08:29 AM
  5. Replies: 4
    Last Post: February 18th, 2002, 07:08 AM

IMN logo majestic logo threadwatch logo seochat tools logo