From: Claudio Nanni Date: October 17 2012 7:44am Subject: Re: Possible to copy the key field to another on INSERT? List-Archive: http://lists.mysql.com/mysql/228433 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b343b00ef882f04cc3c6f42 --047d7b343b00ef882f04cc3c6f42 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Take a look at TRIGGERS C. PS: I am curious to know why you would do that anyway 2012/10/17 W. D. > When creating a record, the first field (KeyField)... > > KeyField BIGINT UNSIGNED NOT NULL AUTO_INCREMENT > > ...is it possible to copy this auto-generated value into > another field when using the same INSERT that creates the record? > > Or would I have to use an UPDATE query using LAST_INSERT_ID() > immediately after the INSERT statement? > > Thanks for any ideas you have. > > Start Here to Find It Fast!=99 -> > http://www.US-Webmasters.com/best-start-page/ > $8.77 Domain Names -> http://domains.us-webmasters.com/ > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql > > --=20 Claudio --047d7b343b00ef882f04cc3c6f42--