Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does mysql specify how much data to query?
How does mysql specify how much data to query?
1, create a test table,

Create table test_limit(id int, value varchar (100));

2. Insert test data containing ***6 records;

Insert into the test_limit value (1,' v1');

Insert into the test_limit value (2,' v2');

Insert into the test_limit value (3,' v3');

Insert into the test_limit value (4,' v4');

Insert into the test_limit value (5,' V5');

Insert into the test_limit value (6,' v6');

3. By querying the total data in the table, you can find ***6 pieces of data, select * from test _ limit t;;

4. Write a statement, specifying to query 3 pieces of data;

select * from test _ limit limit 3;