OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: alter table

From: Felix Geerinckx (felix.geerinckxgmail.com)
Date: Thu Oct 06 2005 - 04:58:30 CDT


On 06/10/2005, "s. keeling" wrote:

> Incoming from Arno Coetzee:
> > s. keeling wrote:
> > > alter table MEMBERS
> > > alter MEMBER_INFO varchar(160);
> > >
> > > ERROR 1064: You have an error in your SQL syntax.
> >
> > http://dev.mysql.com/doc/mysql/en/alter-table.html
>
> Yes, I've read it. Your point? Specifically?

If I read the manual (refered to above) correctly, the only thing you
can put after "alter table MEMBERS alter MEMBER_INFO"
is either "SET DEFAULT literal" or "DROP DEFAULT".

I think you have to use

ALTER TABLE MEMBERS CHANGE MEMBER_INFO MEMBER_INFO VARCHAR(160) ...;

with ... optionally NOT NULL and/or DEFAULT 'whatever'

--
felix

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql