Sorry I didn't mean for *ALL* to include the autoincrement primary key column. :-) I meant all the others that did not use defaults, or have a value other than the default value. It's the difference between one query and three. If autoincrement is set for a column, any value passed will set the next autoincrement for the column to that value +1. So it kind of doesn't make any sense to pass a value for an autoincrement column, unless you are going to try and fill in the gaps from deleted records.
Bob On Dec 20, 2011, at 1:03 PM, Pete wrote: > I'm not sure I follow that logic :-) What's the point of autoincrement if > he has to supply the primary key value and how does he get the next > available primary key value for the insert? > > On Tue, Dec 20, 2011 at 12:50 PM, Bob Sneidar <[email protected]> wrote: > >> I should probably also mention that it would be better to set all your >> column values in the insert statement. Otherwise you will have to query for >> the last inserted primary key and use that in your next UPDATE statement's >> WHERE clause. > > > > > -- > Pete > Molly's Revenge <http://www.mollysrevenge.com> > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
