Received: from auth1.interpath.net (auth1.interpath.net [199.72.1.129]) by hub.org (8.8.8/8.8.8) with ESMTP id HAA07642 for ; Tue, 6 Oct 1998 07:55:05 -0400 (EDT) (envelope-from joden@lee.k12.nc.us) Received: from BethLechem.Yehudah.lee.k12.nc.us (sanford0-101.dyn.interpath.net [207.59.120.101]) by auth1.interpath.net (8.8.5/v1.0) with SMTP id HAA22466; Tue, 6 Oct 1998 07:47:29 -0400 (EDT) Message-ID: <01e501bdf11f$43f8c920$01cc0cac@Yehudah.lee.k12.nc.us> From: "James Oden" To: "Marc Eggenberger" , "Herouth Maoz" Cc: Subject: Re: [SQL] Re: [GENERAL] Still the problem with the autoincrement field Date: Tue, 6 Oct 1998 07:48:20 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0518.4 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0518.4 | |So, what you should do is: | |INSERT INTO offene_stellen ( | bezeichnung, | arbeitsort, | berater | gefordert | geboten |) |VALUES ( | 'Maurer', | 'Buchs', | 'Rheinhalter Claudio', | 'flexibilitaet', | 'gutes Team' |); | |This works, and it also makes sure that if you change the schema such that |the order of the fields is different or there are new fields between the |existing fields, the query won't break. Also, if you are working with a program where the user may want to updated only certain fields you can do that without paying any attention to the order of the fields in the table. I tried to do it the other way with NULLs and such, and its just a real hassle once you change the the structure of the database to go back and make your code conform to the new structure. | |But if you insist on not mentioning field names, I think inserting a NULL |rather than a value in the id field should work. I won't swear on it, It works, but I definately agree with Herouth...don't do it...its a bad idea. You will save yourself much work in the long run if you just include the column names in the update query, and besides if you are embedding this query in a program there should be no problem at all. You type the query once, and provided you typed it correctly, forget about it. ...james