From: prabhat kumar Date: October 1 2009 9:31am Subject: Re: Adding Fields To Table List-Archive: http://lists.mysql.com/mysql/218909 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=000e0cd6a7ba3d998d0474dc504b --000e0cd6a7ba3d998d0474dc504b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Joerg. You are very correct. On Thu, Oct 1, 2009 at 2:40 PM, Joerg Bruehe wrote: > Hi! > > > prabhat kumar wrote: > > You can use : > > > > *ALTER TABLE it ADD COLUMN title varchar(25), phone number integer (6);= * > > > > it will add new column after last. > > > > but you can also specify the particular column after you want to add. > > > > like. > > > > *ALTER TABLE it ADD COLUMN title varchar(25), phone number integer (6) > AFTER > > pusername; * > > The syntax is correct, but one data type is wrong: > > A phone number is no numeric type, it is a string of (mostly) digits. > > Those who think there is no difference, they are wrong: > 1) In a phone number, you may need a leading zero. No numeric type > supports that, unless you try some formatting which would then affect > all values and not just selected ones. > 2) Just ask yourself whether it makes sense to compute the average phone > number (yes, the term is misleading). > > Similar reasoning applies to other digit strings, like article number, > ISBN (books), SSN (social security number), passport number, etc. > > > J=F6rg > > -- > Joerg Bruehe, MySQL Build Team, Joerg.Bruehe@stripped > Sun Microsystems GmbH, Komturstra=DFe 18a, D-12099 Berlin > Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel > Vorsitzender des Aufsichtsrates: Martin Haering Muenchen: HRB161028 > > --=20 Best Regards, Prabhat Kumar MySQL DBA Datavail-India Mumbai Mobile : 91-9987681929 www.datavail.com My Blog: http://adminlinux.blogspot.com My LinkedIn: http://www.linkedin.com/in/profileprabhat --000e0cd6a7ba3d998d0474dc504b--