OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
2 questions on Auto Increment fields

From: C.F. Scheidecker Antunes (nandoantunes.eti.br)
Date: Fri Aug 05 2005 - 18:03:34 CDT


Hello all,

I have two question on Auto Increment fields:

1) For what I see on the MySQL manual you can have an Auto Increment not
null Field as the primary key. Say that you have a table with only
two columns the first being an Auto_Increment. How do I write an INSERT
or REPLACE SQL statement to insert data on this table? Can
I write it so that it will only insert a value for the second column or
do I have to specify NULL on the column on my statement so that MySQL
would fill it up for me.

2) After the INSERT or REPLACE statement runs, can I call something
(hopefully on the same statement) that would return the value filled on
the Auto Increment field?

Thanks in advance,

C.F.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql