May 15, 2003 #1 nkm Programmer May 27, 2001 45 US Can we delete rows in batches from a table until all rows with the particular condition are deleted. e.g. Delete first 10 from <tab1> where ... thanks
Can we delete rows in batches from a table until all rows with the particular condition are deleted. e.g. Delete first 10 from <tab1> where ... thanks
May 15, 2003 #2 qyllr MIS Mar 8, 2001 131 US hello, try using set rowcount... set rowcount 10 while exists (select 1 from tableName where ...) begin delete tableName where ... end go hope this helps, q. Upvote 0 Downvote
hello, try using set rowcount... set rowcount 10 while exists (select 1 from tableName where ...) begin delete tableName where ... end go hope this helps, q.