Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8129371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:17:16+00:00 2026-06-06T08:17:16+00:00

I want to select one record at a time from a MySQL table. I

  • 0

I want to select one record at a time from a MySQL table. I found a similar post on SO here –

How to select records one by one without repeating

However, in my case, the table size is not fixed, The data is continuously been added to the table and I want to select one record at a time from this table. Also, I’m using python to connect to the mysql database and do processing over each record. Any pointers?

P.S. : The size of the table is very large, hence everytime, I can not compute the number of records in the table

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:17:17+00:00Added an answer on June 6, 2026 at 8:17 am

    This functionality isn’t built into SQL.

    If you have a dense, incrementing, indexed column on the table, then you just do this:

    i = 0
    while True:
        # your usual select here, but with "and MyIndexColumn = %d' % (i,)
    

    With some databases, there’s such a column built in, whether you want it or not, usually called either “RowID” or “Row ID”; if not, you can always add such a column explicitly.

    If the values can be skipped (usually they can, e.g., if for no other reason than because someone can delete a row from the middle), you have to be able to handle a select that returns 0 rows, of course.

    The only issue is that there’s no way to tell when you’re done. But that’s inherent in your initial problem statement: data is being continuously added, and you don’t know the size of it in advance, so how could you? If you need to know when the producer is done, it has to somehow (possibly through another table in the database) give you the highest rowid it created.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get possibility to select several Categories for one Post with multiple
i have users table and i have posts table i want select from users
I am trying to populate one table from another table with mysql. First table
I have different select boxes. I want to select second one with related id.
I want to SELECT a formatted date string from a datetime type in SQL
I want to select all categories from a webservice. The webservice does not have
I want to select information in a single cell from my DataGrid in Flex
I have read many article about this one. I want to hear from you.
I want to display 1 random record from a database based on the week.
I want to get records from the database using EF and assign the values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.