473,498 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add columns in an existing table in phpmyadmin

23 New Member
Hi,
How can i add(append) extra columns to a table using phpmyadmin? or through coding?
Thanks.
Nov 15 '06 #1
5 36419
ronverdonk
4,258 Recognized Expert Specialist
- click the db at the left side of the screen, tables are shown
- click the table name at the left side of the screen
- all columns are displayed at right hand side of screen
- below the column display there is a row
Expand|Select|Wrap|Line Numbers
  1. Add  field(s)At End of Table At Beginning of Table After column_name GO
At that line you can add a new column to the show table.

Ronald :cool:
Nov 15 '06 #2
glady
23 New Member
- click the db at the left side of the screen, tables are shown
- click the table name at the left side of the screen
- all columns are displayed at right hand side of screen
- below the column display there is a row
Expand|Select|Wrap|Line Numbers
  1. Add  field(s)At End of Table At Beginning of Table After column_name GO
At that line you can add a new column to the show table.

Ronald :cool:
Thanks a lot !!!!:-)
Nov 16 '06 #3
glady
23 New Member
Thanks a lot !!!!:-)
Hey ,How could i do the same using coding?
Nov 17 '06 #4
guruparthi
1 New Member
For add column:
Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE table_name add COLUMN column_name varchar(30)
For add column after specific filed,
Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE table_name add COLUMN column_name varchar(30) AFTER column_name
For add column at first
Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE table_name add COLUMN column_name varchar(30)FIRST
<Snip>
Jan 10 '14 #5
johndavid19
4 New Member
You can add column after particular field. The mysql query is
Expand|Select|Wrap|Line Numbers
  1. alter table table_name add column col_name datatype(length) after field_name
where, you need to use "after" keyword

Similarly, you can also add column at first of table. the query is
Expand|Select|Wrap|Line Numbers
  1. alter table table_name add column col_name first
Here you need to use "first" keyword
Jul 3 '14 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
6560
by: dev | last post by:
how create a temp table as a copy of a existing table and then update1 field and insert the hole temp table back in the existing table? please any help? if i have 10 fields in 1 record and...
4
2261
by: dave | last post by:
I need to add a column to a table using code. The following works, but only for a new table. How should I change this to alter an existing table? Dim strConn Dim Catalog As New...
3
4888
by: Raj | last post by:
Hi, I am trying to add some more information to the table which already has a lot a data (like 2-3000 records). The new information may be adding 2-3 new columns worth. Now my questions are:...
1
10935
by: deko | last post by:
DoCmd.CopyObject copies data, but I only need structure. I'm trying to clone several tables in my Access 2003 mdb. The goal is to link to a series of Excel spreadsheets and then run various...
5
2941
by: Wayne Wengert | last post by:
I am using VB ASP.NET. In my page I convert an uploaded XML file to a dataset as follows: Dim ds1 As DataSet = New DataSet ds1.ReadXml(strPathName, XmlReadMode.Auto) Now I want to append...
1
3464
by: aling | last post by:
Damn! SQLServer2000 can't add a NOT NULL COLUMN even in one empty existing table! That is, A is the existing table and it is emtpy, I want to add one NOT NULL COLUMN (col_new) to A using following...
2
1255
by: cyclops | last post by:
Hello everyone, I need to add 10 fields into an existing table which already has 186 fields. but i am not able to do so as i keep getting error message when i try to save the table. Property...
1
5156
by: arcingmad | last post by:
Hi I am using the following code in a button click event to run a query stored in a .mdb file from an external geographic program ArcGIS via a jet adodb connection I have the need to run an...
16
4883
by: scoots987 | last post by:
Hi all, I have an existing table(Several actually) that I want to add a column or two or three. I need to have, I think, at least two columns. One for Created date and believe this is a no...
10
12039
by: timleonard | last post by:
I am trying to update some existing database tables by inserting some new fields in a set order within the existing table. The issue I am having is it inserts the new field at the existing position...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7203
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.