1

Topic: Request SQL about sampling of certain number of records

There is a request

SELECT * FROM users WHERE id> 5 LIMIT 100

1. Could not understand that means> 5
2. How to make that selected there were not 100 the first, and

2

Re: Request SQL about sampling of certain number of records

aliwka wrote:

could not understand that means> 5

There not "> 5", and "WHERE id> 5". Translate into Russian - you will understand.

aliwka wrote:

How to make that selected was not 100 of the first, and

Prepared statement.

3

Re: Request SQL about sampling of certain number of records

Akina wrote:

it is passed...
Prepared statement.

Still a variant - WHERE RAND () <0.1

4

Re: Request SQL about sampling of certain number of records

miksoft;
. it will look so?
SELECT * FROM users WHERE id ORDER BY RAND () LIMIT 100

5

Re: Request SQL about sampling of certain number of records

aliwka wrote:

miksoft;
. it will look so?
SELECT * FROM users WHERE id ORDER BY RAND () LIMIT 100

It is a variant which offered Akina.
And mine about the such:

SELECT * FROM users WHERE RAND () <0.1

What to select - depends on how to treat a word "" in a start post.