List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:December 2 1999 5:55pm
Subject:Re: What Went Wrong (Again)
View as plain text  
At 11:13 AM -0500 12/2/99, Fraser MacKenzie wrote:
>Ah....I didn't have the exact syntax, but it wasn't the error that he was
>getting...  It is the two nic together that were giving the error
>message...

No it wasn't.  CHANGE requires both the current and new column names, even
if the name doesn't change.  MODIFY doesn't rename the column and requires
only the current column name.


>
>
>Fraser MacKenzie (fraserm@stripped)
>---------------- (ICQ: 15389075    RPGA: 805219)
>Rondak's Portal  (http://www.rondaksportal.com/)
>
>What do you want to play today?
>
>On Thu, 2 Dec 1999, Martin Edelius wrote:
>
>>  Date: Thu, 2 Dec 1999 17:06:07 +0100
>>  From: Martin Edelius <martin.edelius@stripped>
>>  To: Fraser MacKenzie <fraserm@stripped>,
>>      Renato Lins <TheBest@stripped>
>>  Cc: mysql@stripped
>>  Subject: Re: What Went Wrong (Again)
>>
>>  You need to put default after the not null.
>>
>>  ALTER TABLE clientes CHANGE nic nic INT (11) UNSIGNED not null DEFAULT 50 ;
>>
>>
>>  Best regards,
>>  Martin Edelius
>>
>>  Spirex Digital Design
>>  --------------------------------
>>  www: http://www.spirex.se
>>  Mail: martin.edelius@stripped
>>  Phone: +46-31-514651, 0708-113711
>>  Fax: +46-31-514331
>>  Ar–ds Industriv”g 3c
>>  S-422 43 Hisings Backa
>>  --------------------------------
>>  If I haven't gotten back to you or done what I'm supposed to, let me know
>>  again as I have too much to do for my own good...
>>
>>  ----- Original Message -----
>>  From: "Fraser MacKenzie" <fraserm@stripped>
>>  To: "Renato Lins" <TheBest@stripped>
>>  Cc: <mysql@stripped>
>>  Sent: Thursday, December 02, 1999 4:54 PM
>>  Subject: Re: What Went Wrong (Again)
>>
>>
>>  > Try this:
>>  >
>>  > ALTER TABLE clientes MODIFY nic int(11) UNSIGNED DEFAULT '50' NOT NULL;
>>  >
>>  > Notice that I use MODIFY not CHANGE, and as well, that nic is only listed
>>  > once because the name of the field isn't changing.....
>>  >
>>  > Fraser MacKenzie (fraserm@stripped)
>>  > ---------------- (ICQ: 15389075    RPGA: 805219)
>>  > Rondak's Portal  (http://www.rondaksportal.com/)
>>  >
>>  > What do you want to play today?
>>  >
>>  > On Thu, 2 Dec 1999, Renato Lins wrote:
>>  >
>>  > > Date: Thu, 2 Dec 1999 11:35:11 -0400
>>  > > From: Renato Lins <TheBest@stripped>
>>  > > To: mysql@stripped
>>  > > Subject: What Went Wrong (Again)
>>  > >
>>  > > Already tried
>>  > >
>>  > > ALTER TABLE clientes CHANGE nic nic INT (11) UNSIGNED DEFAULT 50 not
>>  null ;
>>  > >
>>  > > Got same error !!
>>  > >
>>  > > ERROR: Invalid default value for 'nic'
>>  > >
>>  > >
>>  > >
>>  >
>>  >
>>  > ---------------------------------------------------------------------
>>  > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>>  > posting. To request this thread, e-mail mysql-thread20117@stripped
>>  >
>>  > To unsubscribe, send a message to the address shown in the
>>  > List-Unsubscribe header of this message. If you cannot see it,
>>  > e-mail mysql-unsubscribe@stripped instead.
>>  >
>>  >
>>
>>
>
>
>---------------------------------------------------------------------
>Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
>posting. To request this thread, e-mail mysql-thread20120@stripped
>
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail mysql-unsubscribe@stripped instead.


-- 
Paul DuBois, paul@stripped
Thread
What Went Wrong (Again)Renato Lins2 Dec
  • Re: What Went Wrong (Again)Fraser MacKenzie2 Dec
    • Re: What Went Wrong (Again)Martin Edelius2 Dec
      • Re: What Went Wrong (Again)Fraser MacKenzie2 Dec
        • Re: What Went Wrong (Again)Paul DuBois2 Dec
  • Re: What Went Wrong (Again)Bogdan Paduraru2 Dec