List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:July 22 1999 11:20pm
Subject:Re: timestamp (before: auto_increment question)
View as plain text  
At 18:58, 19990722, Denis Voitenko wrote:
>create table chat (who varchar(8), said varchar(255), time timestamp);
>
>and insert values like this:
>
>insert into chat values("Denis","Hello, everyone!","");

Whoa!  "" is not the same as NULL!  Not even close to being anything
at all like NULL.  Do this instead:

    INSERT INTO chat (who, said)
    VALUES ("Denis", "Hello, everyone!");

Or, if you feel like you have to list all of the fields, do:

    INSERT INTO chat (who, said, time)
    VALUES ("Denis", "Hello, everyone!", NULL);

Tim
Thread
auto_increment questionDenis Voitenko22 Jul
  • Re: auto_increment questionNem W Schlecht22 Jul
    • Re: auto_increment questionDenis Voitenko23 Jul
      • Re: auto_increment questionThimble Smith23 Jul
    • Re: auto_increment questionDenis Voitenko23 Jul
      • Re: auto_increment questionThimble Smith23 Jul
      • Re: auto_increment questionBill Gerrard23 Jul
        • timestamp (before: auto_increment question)Denis Voitenko23 Jul
          • Re: timestamp (before: auto_increment question)Thimble Smith23 Jul
          • Re: timestamp (before: auto_increment question)Paul DuBois23 Jul
  • Re: auto_increment questionPaul DuBois22 Jul