vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello ! I have this Table : one Field : NUM_AUTO wich is auto_increment and Fields : FIELD1, FIELD2, FIELD3, FIELD4 ... I have this sql "insert" : INSERT INTO myTable (FIELD1, FIELD2) VALUES (VAL1,VAL2) I would like to know the NUM_AUTO for this INSERT, how can I manage that ? (My Table can have similair couple of values (VAL1, VAL2)) thanks ! |
| |||
| Claude (F) wrote: > Hello ! > > I have this Table : > one Field : NUM_AUTO wich is auto_increment > and Fields : FIELD1, FIELD2, FIELD3, FIELD4 ... > > I have this sql "insert" : > > INSERT INTO myTable (FIELD1, FIELD2) VALUES (VAL1,VAL2) > > I would like to know the NUM_AUTO for this INSERT, how can I manage that ? > (My Table can have similair couple of values (VAL1, VAL2)) > > > thanks ! http://dev.mysql.com/doc/refman/5.1/...crement-select -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| |||
| Jerry Stuckle <jstucklex@attglobal.net> wrote: > Claude (F) wrote: >> I have this Table : >> one Field : NUM_AUTO wich is auto_increment >> and Fields : FIELD1, FIELD2, FIELD3, FIELD4 ... >> >> I have this sql "insert" : >> >> INSERT INTO myTable (FIELD1, FIELD2) VALUES (VAL1,VAL2) >> >> I would like to know the NUM_AUTO for this INSERT, how can I manage that ? > > http://dev.mysql.com/doc/refman/5.1/...crement-select Getting the last generated AUTO_INCREMENT value is not Java specific. Also the general manual page is much more detailed: http://dev.mysql.com/doc/refman/5.0/...increment.html XL -- Axel Schwenke, Senior Software Developer, MySQL AB Online User Manual: http://dev.mysql.com/doc/refman/5.0/en/ MySQL User Forums: http://forums.mysql.com/ |