List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:June 30 1999 8:27pm
Subject:Re: problems with DEFAULT statement in MySQL 3.22.23b
View as plain text  
Tim McQueen wrote:
> 
> I'm having problems assigning default values when I create a table.  For instance, if
> I have a table:
> 
> create table foo (
>     user char(16) NOT NULL,
>     passwd char(16) DEFAULT  'password' NOT NULL,
>     PRIMARY KEY (user)
> );
> 
> and INSERT the values ('joeuser','')
> 
> shouldn't it populate the table with the values ('tmcqueen','password') ?
> 
> Thanks in advance for any help.
> 
> Tim McQueen
> tmcqueen@stripped

No. INSERT INTO foo (user) VALUES ('joeuser') will insert ('joeuser',
'password')

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
problems with DEFAULT statement in MySQL 3.22.23bTim McQueen1 Jul
  • Re: problems with DEFAULT statement in MySQL 3.22.23bT├Ánu Samuel1 Jul
  • Re: problems with DEFAULT statement in MySQL 3.22.23bSasha Pachev1 Jul
  • Re: problems with DEFAULT statement in MySQL 3.22.23bDaniel Koch1 Jul
RE: problems with DEFAULT statement in MySQL 3.22.23bdaniel.gardner1 Jul