473,386 Members | 1,743 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,386 software developers and data experts.

How to create a new column for an existing table?

65
i already create the table but now i want to add one more column for this table then what command i should write?
May 17 '07 #1
2 3544
pradeep kaltari
102 Expert 100+
i already create the table but now i want to add one more column for this table then what command i should write?
Hi wish,
The syntax for doing this is:
Expand|Select|Wrap|Line Numbers
  1. ALTER TABLE <table_name> ADD COLUMN <column_name> <datatype>
  2.  
Let me know if this is what you wanted.

Regards,
Pradeep
May 17 '07 #2
pbmods
5,821 Expert 4TB
For more info:
http://dev.mysql.com/doc/refman/5.0/en/alter-table.html
May 19 '07 #3

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: Twan Kennis | last post by:
How can I drop a column from an existing table: CREATE TABLE table1 (column1 integer, column2 integer) succeeds. ALTER TABLE table1 DROP COLUMN column2 turns into an error "Error:...
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...
6
by: Jim's wife | last post by:
Hi all I need to create a new table based on a source table. The new table is almost the same as the source table in that just some field names must change, and a few new fields added or...
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:...
3
by: GL | last post by:
Hi, Is there a way to add a field to an existing table using a query of some sort (without needing to manually add a field to the table). I know how to do it with a make table query, but I have...
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...
6
by: shsandeep | last post by:
Can I partition an existing table? I have a table which has started growing at a very fast pace and would like to partition it. Thanks. Cheers, San.
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...
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
0
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
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,...

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.