From: Chris Frey Date: March 15 2005 8:36am Subject: Re: auto_increment List-Archive: http://lists.mysql.com/plusplus/4149 Message-Id: <20050315083611.GA26160@netdirect.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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; > > 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