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;


Popular posts from this blog

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

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"