At 22:28 -0600 3/21/03, Paul DuBois wrote:
At 20:04 -0800 3/21/03, Todd Cary wrote:
<div class="moz-text-flowed" style="font-family: -moz-fixed">I would like to avoid the necessity of specifying all of the fields -
instead use the following syntax:


INSERT INTO teachers VALUES
(1,12345,NULL,'Harry','Smith','707-773-4523',2',...

However, the first field is an autoincrementing field.  Will MySQL
ignore my value and overwrite it with the "auto" value?

No. It will only generate an auto-increment value if you specify NULL or omit the column value from the statement. In the latter case you must provide a column list so that MySQL knows which data values go in which clients.

Er, ... go in which *columns*.




--
Paul DuBois
http://www.kitebird.com/
sql, query


---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to