SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jan 2003
    Location
    esperanto
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    newbie questions - MySql max limits and columns

    Hello everyone,

    I have some questions about MySql.

    Is there any way insert new column between existing columns? What I mean is, I want to add new column(s) into table, say the table tb_ mydata has columns email, name, phone, address and now I want to add company_name into it, is there any way I can add a company_name between name and phone? I want to make look like this:

    email, name, company_name, phone, address

    I just want to organize...

    The other question is, are there any problems if I make a big tables? I have this table already has about 20 columns, and I want to add 15 or so more columns to that table. Should I make a new table instead of add new columns to the existing one?

    Thanks in advance!

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Don't worry about it - just add it to the end. You can define the order of the fields when you extract the information from the database tables.
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2002
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the only size limitations I've found are in the tool that could easily do what you asked for in Point#1: phpMyAdmin. I'm building a golf scoring tool for my friends to track our scores and betting totals ! and on a few tables, I've got 50+ columns (18 holes x 3 attributes + indexing info) in phpMyAdmin I'm unable to delete the rows in this large table. using the SQL commandline, no problem.

    So, I'm not sure based on the backend; I've only seen a limitation w/ the webtool

  4. #4
    SitePoint Member
    Join Date
    Jan 2003
    Location
    esperanto
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks both for taking time to reply, That was very helpful.

    Quote Originally Posted by hakalugi
    in phpMyAdmin I'm unable to delete the rows in this large table. using the SQL commandline, no problem.
    That will be a little problem for me since I never used "the SQL commandline" via telnet/ssh, just hope there will be no problem...

    Do you know where can I get list of the phpmyadmin command lines? telnet/ssh + sql commandline is a little difficult for me, I guess.

    Thanks again,

  5. #5
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    phpMyAdmin doesn't have a command line as such, although it does have a SQL option that allows you to create your own SQL commands for phpMyAdmin to process and execute.
    Ian Anderson
    www.siteguru.co.uk

  6. #6
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bohemian
    I have this table already has about 20 columns, and I want to add 15 or so more columns to that table. Should I make a new table instead of add new columns to the existing one?
    That depends.

    An example: If all the information, in one row, is about a person then you're probably ok. But if the information contains both personalt info and information about the company this person is working for, you should go with two tables. One for the person and on for the company.

    -Helge


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
  •