Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Pratik Singh
  Where is Pratik Singh?
 Kota
 India
 Pratik Singh
 Tags
Subject: RE: mysql structure update
Thread ID: 395421 Message ID: 395426 # Views: 43 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Tuesday, January 14, 2014 8:21:38 PM         
   


> HI
>
> Need mysql structure update without drop table. because if i drop table all data also drop.
>
> i need my existing table still alive and missing fields add in table so that table data also saves and missing fields add in table
> how is possible
>
> i found many code from google uncle but all code first drop table and make new. that i lost data.
>
>
>
> Regard
> Pratik
>
> Learning never ends


Hi,

Below is how you should be adding in a column,

ALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name
[alter_specification [, alter_specification] ...]
[partition_options]

EXAMPLES BELOW BASED UPON A MySQL TABLE NAME of Contacts . . .

This first statement will add the email column to the end of the table:
ALTER TABLE Contacts ADD email VARCHAR(60);


To insert the new column after a specific column, such as name, use this statement:
ALTER TABLE Contacts ADD email VARCHAR(60) AFTER name;


If you want the new column to be first, use this statement:
ALTER TABLE Contacts ADD email VARCHAR(60) FIRST;

Pete "the IceMan", from the Great White North of Canada.
www.marathongriffincomputers.com

ENTIRE THREAD

mysql structure update Posted by Pratik Singh @ 1/14/2014 8:01:32 PM
RE: mysql structure update Posted by Tore Bleken @ 1/14/2014 8:12:07 PM
RE: mysql structure update Posted by Pratik Singh @ 1/14/2014 8:27:49 PM
RE: mysql structure update Posted by Pete Sass @ 1/14/2014 8:21:38 PM
RE: mysql structure update Posted by Vivek Deodhar @ 1/15/2014 6:31:12 AM