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!
newbie questions - MySql max limits and columns
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Are you using phpMyAdmin, it makes it easy to add a column between others.
Whether or not it's worth having more than one table will depend on what you are storing in it...
Mac
Whether or not it's worth having more than one table will depend on what you are storing in it...
Mac
Thanks for taking time to reply,
Yes, I'm using phpmyadmin, can you tell me where can I get the list of the phpmyadmin command lines? I googled, but could not find it, and I also checked the site you mentioned, but unable to find the info...
I'm messing with this dating site software and the table that I want to add some more columns into it has users' profile info, ex; eye color, star sign, a few 1,500 + characters text that user's describing themselves, etc, etc, so it's already big. Do you think I'm better to make a new table in this case?
Thanks again,
Yes, I'm using phpmyadmin, can you tell me where can I get the list of the phpmyadmin command lines? I googled, but could not find it, and I also checked the site you mentioned, but unable to find the info...
I'm messing with this dating site software and the table that I want to add some more columns into it has users' profile info, ex; eye color, star sign, a few 1,500 + characters text that user's describing themselves, etc, etc, so it's already big. Do you think I'm better to make a new table in this case?
Thanks again,
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
In phpMyAdmin, choose the table you want to modify, scroll down to where it says 'Add new field' and decide how many you want and where to add them. If you want to do it by SQL query, check out:
http://www.mysql.com/doc/en/ALTER_TABLE.html
MySQL can handle lots more columns than you would ever probably need in a table. Maybe if you post your proposed database schema it will be easier to see whether it would be advantageous to split it.
Mac
http://www.mysql.com/doc/en/ALTER_TABLE.html
MySQL can handle lots more columns than you would ever probably need in a table. Maybe if you post your proposed database schema it will be easier to see whether it would be advantageous to split it.
Mac