473,473 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Create 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 36418
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
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
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
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
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
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
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
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
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
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
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
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.