RE: INSERT with auto increment

2010-07-01 Thread David Stoltz
Awesome - thanks all for that clarification! -Original Message- From: Michael Dykman [mailto:mdyk...@gmail.com] Sent: Wednesday, June 30, 2010 1:42 PM To: David Stoltz Cc: mysql@lists.mysql.com Subject: Re: INSERT with auto increment generally, it is: INSERT INTO TABLE1 (fieldname

Re: INSERT with auto increment

2010-06-30 Thread Michael Dykman
generally, it is: INSERT INTO TABLE1 (fieldname [ , fieldname]* ) VALUES (value[, value]*) If you don't list the columns, it assumes you are inserting all of them, so: INSERT INTO TABLE1 (mycolumn ) VALUES ('stuff') This will also work INSERT INTO TABLE1 VALUES (0, 'stuff') the

Re: INSERT with auto increment

2010-06-30 Thread Jo�o C�ndido de Souza Neto
You can choose between: INSERT INTO TABLE1 VALUES (null,'stuff') or INSERT INTO TABLE1 (stuffField) VALUES ('stuff') -- João Cândido de Souza Neto David Stoltz dsto...@shh.org escreveu na mensagem news:487e7d0857fe094590bf2dc33fe3e1080a102...@shhs-mail.shh.org... Hi All, In MS SQL, if

Re: INSERT with auto increment

2010-06-30 Thread Jan Steinman
From: David Stoltz dsto...@shh.org In mySQL, if I expressly give it a value, like INSERT INTO TABLE1 VALUES(17,'stuff') - it works fine. But if I remove the 17, it says I don't have a matching number of columns. Use NULL for the autoinsert column. I made it a rule to forbear