There is a script that takes one value from the database and runs from start to finish.

Is it possible in the database to start not from the beginning?

those. I need to start sampling values ​​with the 350th record, I do not need that the sample be from the very beginning.

  • It seems to me that you have the wrong execution logic. What is the meaning of this action? - Smithson
  • one
    @Smithson, how is it in what? You have several * Lard entries in the table. When accessing a table, will you view everything at once, or will you load it by "slightly"? - JVic
  • Personally, I will write the condition of the sample, and not load a little bit. - Smithson
  • @Smithson, okay, how do you get all the questions from this resource? Here we open the main page of SO and see below the pagination with pages with all the questions - JVic

2 answers 2

SELECT * FROM table LIMIT 50 OFFSET 350; 

In general, do not hesitate to first use the search.

     select * from table limit 349, 200 

    It will give 200 lines with 350 lines (numbering in this case comes from the 0th line, therefore 349).

    In general, read about limit :

    The number of rows is up. The offset of the initial row is 0 (not 1): SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15