Re: Delete Cursor: What To Use In Select Clause?
Posted in 1996
Alexander J. Oss wrote: > > I am using a SELECT ... FOR UPDATE cursor to perform DELETE ... WHERE > CURRENT statements. > > Since I am not interested in the contents of the records I am deleting, I > don't really need anything in the select clause of the SELECT statement, > but it seems that syntax requires me to put something there. I'm > currently just using the serial not null primary key field. > > Does it matter what goes there? > Hi Alexander, you have done it just right.By placing the primary key field only in your select statement the engine will do a key only search which is very effective compared with a select * or something else which you anyway don't need. Regards Tolis +---------------------------------------------------------------------+ | V+K Relational Solutions email: tvarnas@compulink.gr | | Deligiorgi 26 tvarnas@orbit.de | | 546 42 Thessaloniki Voice: (30) 31 820270 | | Greece Fax: (30) 31 865463 | +---------------------------------------------------------------------+