|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Adding a column
Hi everyone,
I need help adding a column to an exsisting MySQL table. is there a way to create the column, or do I have to re-create the table? thanks Qutaibah |
|
#2
|
|||
|
|||
|
Hi qutaibah,
Welcome to the devArticle forums! ![]() You can use the ALTER TABLE command for this. Read about it here: http://www.mysql.com/doc/A/L/ALTER_TABLE.html Example: ALTER TABLE tablename ADD COLUMN newcol Now, to insert the new column after a column named for example id you would have to write: ALTER TABLE tablename ADD COLUMN newcol AFTER id There you go! ![]()
__________________
Best Regards, Håvard Lindset |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Adding a column |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|