List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:March 15 2005 8:36am
Subject:Re: auto_increment
View as plain text  
On Mon, Mar 14, 2005 at 12:58:28PM -0800, Earl Miles wrote:
> I *think* -- and this is where it gets quite hazy for me, because I
> have not actually used either the specialized structures OR the Null
> class (though I do need to use the Null class at some point) you
> will need to do something like this:
> 
> subscription.id = Null<int>;
> 
> However, I'm not 100% sure that works with the specialized type classes
> without going into the code and seeing if they respect the Null class.
> I should imagine they do, but imagining will not make it so =)

I tried doing this from the mysql command line, like:

	INSERT INTO Category (CategoryID, Name) VALUES (NULL, "hello");

And it worked fine.  (CategoryID being auto-increment in my table)

This seems to be vaguely documented on
http://dev.mysql.com/doc/mysql/en/information-functions.html
under LAST_INSERT_ID().

- Chris

Thread
auto_incrementJoachim Person14 Mar
  • Re: auto_incrementChris Frey14 Mar
    • Re: auto_incrementEarl Miles14 Mar
      • Re: auto_incrementChris Frey15 Mar
        • sql_create in headerdon thompson7 Apr
          • Re: sql_create in headerWarren Young8 Apr
            • Re: sql_create in headerdon thompson8 Apr
          • Re: sql_create in headerWarren Young9 Apr
  • Re: auto_incrementWarren Young15 Mar
    • Re: auto_incrementWarren Young15 Mar