title: Data Partition in C#
body: <p>I want to distribute a large amount of data to different C# applications. For example, my table contains millions of records. I would like to specify that first 3 millions records are processed by App1 and next 3 million in another C# application App2 and so on. Table rows are deleted and added as per requirement. Now I want to write a SQL query that will process first 3 million records. Now if 5 records are deleted from app1 then app1 must fetch next 5 records from app2 and app2 from app3. So that data always remain constant in each app.</p>
  
  <p>I have used limit in the SQL query, but I didn't get the required output. How can I write the SQL query for this and how should I design the C# application.</p>