Deleting Multiple Rows
From: Guadala Harry (GMan_at_NoSpam.com)
Date: 08/16/04
- Next message: JOEF: "Inner join question"
- Previous message: Greg Linwood: "Re: T-SQL and OLE Automation"
- Next in thread: Dandy WEYN: "Re: Deleting Multiple Rows"
- Reply: Dandy WEYN: "Re: Deleting Multiple Rows"
- Reply: David Portas: "Re: Deleting Multiple Rows"
- Reply: Dandy WEYN: "Re: Deleting Multiple Rows"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Aug 2004 14:05:13 -0700
Suppose I have a very simple table (just one column of integers, not null,
for the sake of simplicity).
I have an application that interacts with this table (in a SS2K database)
via ADO.NET.
There will periodically be the need to arbitrarily delete 300-500 out of
150,000 rows from this table (arbitrarily - meaning that the integers to be
deleted do not necessarily fall in a range).
My application has the logic that determines which of the rows need to be
deleted.
What is an efficiant and recommended way to get rid of these rows?
Should the app execute a stored procedure 300 times - once for each row to
be deleted? I'd hate to do that if I don't have to (transaction or not). Is
there a way to pass to the stored procedure the list of 300 integers that
need to be deleted and then the stored procedure executes only one DELETE
statement that does the job? I can pass the list to the SP - but how to get
the DELETE statement to use it? Is there a better way altogether?
Thanks!
-G
- Next message: JOEF: "Inner join question"
- Previous message: Greg Linwood: "Re: T-SQL and OLE Automation"
- Next in thread: Dandy WEYN: "Re: Deleting Multiple Rows"
- Reply: Dandy WEYN: "Re: Deleting Multiple Rows"
- Reply: David Portas: "Re: Deleting Multiple Rows"
- Reply: Dandy WEYN: "Re: Deleting Multiple Rows"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|