mySql - Get N Top rows

In mySql to return the first N rows execute the following:
  • select * from <table_name> limit N;
Besides, mySql as a very useful feature, the "offset" in conjunction with "limit" may let define any interval that you desire, for instance to return rows 10 to 20:
  • select * from <table_name> limit 10 offset 10;

Comments

Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

spring @async causing BeanCurrentlyInCreationException