That is the effect that I am looking for, but exactly the method that I am trying to avoid. If I type the column names into my INSERT... SELECT and someone later adds a column to the table, I would have to go back into my program and update the statement. I am looking for a way to do it dynamically in order to avoid maintenance of the statement in my program later.
Rob Danny Stolle [mailto:[EMAIL PROTECTED] wrote: Hi, I am hoping you meen this: You have to use the fields in your into -statement and select statement, not including the field having the auto-numbering so if e.g. field1 has autonumbering -> insert into table1 (field2, field3) select (field2, field3) from table1; autonumbering will automatticaly be applied :-) Danny Schimmel LCpl Robert B (GCE 2nd Intel Bn Web Master) wrote: > Here is the problem that I am having. I am trying to make a copy of a > full record in a table that has a primary key with auto-increment. The > real problem is that I want the statement to use SELECT * so that if > columns ever get added to the table the statement will still work for > the full record. I know that I can use the information_schema to do this > in MySQL 5, but the server I am currently work with is MySQL 4. > Basically, I am looking for a way to select all of the columns in a > record except one, so that the auto-incrementing primary key will > automatically insert itself. Of course, if anyone has any other > suggestions for a work around, that would be good, too. > > > > Rob Schimmel > > 2d Intel bn > > USMC > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]