On 1/19/06, manoj marathayil <[EMAIL PROTECTED]> wrote: > ok this i can do, but the problem is i need to select a set of records and i > want to manipulate with each record then only i need to delete that record
That's why I had it separated. Select the set into a temporary table. Process the records listed in the temporary table. Then delete them when you're finished using the temporary table to define what to delete: delete from source_table where id in ( select id from temp_table ); > > Jay Sprenkle <[EMAIL PROTECTED]> wrote: On 1/19/06, manoj marathayil wrote: > > > > hi, > > is there is any way so that i can store the result > > of > > a select query and execute a delete query on the > > same > > table with out using any other buffer? > > How about: > > select id > into temp_table > from source_table > where somecondition = true; > > delete from source_table > where id in ( select id from temp_table ); > > > > Send instant messages to your online friends http://in.messenger.yahoo.com > -- --- The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's Call http://www.lulu.com/content/77264