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

    Join Date
    Mar 2000
    Location
    Fitzgerald Ga USA
    Posts
    8
    Rep Power
    0
    I have a program that I purchased that uses MySQL and PERL DBI. I ran into a problem where they preset the "title" column to 35 lenght, and I got that solved where it will allow 45 now. The problme I have now is I need to add at least 3 more columns to an existing table. I'm assuming I use the INSERT INTO command at the mysql prompt...but is there anything I should beware of, or am I barking up the wrong tree? ALSO: if I do attempt to add a new column to an existing database, how do I delete the column with out deleting the entire database??? Thank you in advance for your help!

    Brant
    Webnautics
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Blackstone, VA, USA
    Posts
    5
    Rep Power
    0
    you can add columns to a table by using the following code where your table is named "mytable":
    ALTER table mytable ADD mycolumn INT(2);
    ALTER table mytable DROP mycolumn;

    for more information on this visit the mysql tutorial here on devshed. http://www.devshed.com/Server_Side/M...tro/page5.html
    Good Luck

Similar Threads

  1. adding Table with PHP Code ?
    By php_beginner in forum PHP Development
    Replies: 4
    Last Post: February 2nd, 2004, 09:45 PM
  2. adding a wireless notebook to and existing home network
    By punkrd13 in forum Networking Help
    Replies: 1
    Last Post: January 1st, 2004, 04:43 AM
  3. adding xp laptop to existing wireless network
    By mikepizz in forum Networking Help
    Replies: 1
    Last Post: December 6th, 2003, 08:02 PM
  4. alter table: adding new fields in given sequence?
    By genedavinci in forum MySQL Help
    Replies: 3
    Last Post: May 10th, 2002, 10:54 PM
  5. Adding column to table with date_format()
    By porsche911 in forum MySQL Help
    Replies: 2
    Last Post: September 28th, 2001, 08:18 AM

IMN logo majestic logo threadwatch logo seochat tools logo