473,239 Members | 1,491 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

How to add columns in an existing table in phpmyadmin

23
Hi,
How can i add(append) extra columns to a table using phpmyadmin? or through coding?
Thanks.
Nov 15 '06 #1
5 36402
ronverdonk
4,258 Expert 4TB
- 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
- 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
Thanks a lot !!!!:-)
Hey ,How could i do the same using coding?
Nov 17 '06 #4
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
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: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.