{"id":199,"date":"2019-10-05T17:02:59","date_gmt":"2019-10-05T10:02:59","guid":{"rendered":"https:\/\/mariadbtutorial.com\/?page_id=199"},"modified":"2020-04-11T23:24:10","modified_gmt":"2020-04-11T16:24:10","slug":"mariadb-limit","status":"publish","type":"page","link":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/","title":{"rendered":"MariaDB Limit"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the MariaDB <code>limit<\/code> clause to specify the number of rows returned by a query.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to MariaDB limit clause<\/h2>\n\n\n\n<p>The <code>limit<\/code> clause allows you to specify the number of rows returned by a <code><a href=\"https:\/\/mariadbtutorial.com\/mariadb-basics\/mariadb-select\/\">select<\/a><\/code> statement.<\/p>\n\n\n\n<p>Here is the syntax of the <code>limit<\/code> clause:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span> select_list\n<span class=\"hljs-keyword\">from<\/span> tale_name\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> sort_expression\n<span class=\"hljs-keyword\">limit<\/span> n &#91;<span class=\"hljs-keyword\">offset<\/span> m];\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this syntax:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>n<\/code> is the number of rows to return<\/li><li><code>m<\/code> is the number of rows to skip before returning the <code>n<\/code> rows.<\/li><\/ul>\n\n\n\n<p>The <code>select<\/code> statement returns rows in an unspecified order, therefore, the <code>limit<\/code> clause without an <code><a href=\"https:\/\/mariadbtutorial.com\/mariadb-basics\/mariadb-order-by\/\">order by<\/a><\/code> clause will return a result of unspecified rows.<\/p>\n\n\n\n<p>It is a good practice to always use the <code>limit<\/code> clause with an <code>order by<\/code> clause to make returned rows predictable.<\/p>\n\n\n\n<p>MariaDB provides an alternative syntax of the <code>limit<\/code> clause as follows:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">LIMIT m, n;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The syntax means skipping <code>m<\/code> rows and returning the next <code>n<\/code> rows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MariaDB limit clause examples<\/h2>\n\n\n\n<p>We&#8217;ll use the <code>countries<\/code> table from the <a href=\"https:\/\/mariadbtutorial.com\/getting-started\/mariadb-sample-database\/\">sample database<\/a>&nbsp;to demonstrate the <code>limit<\/code> clause:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"144\" height=\"184\" src=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png\" alt=\"\" class=\"wp-image-144\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">A) Using the MariaDB limit clause examples<\/h3>\n\n\n\n<p>The following statement returns all rows from the <code>countries<\/code> table sorted by the country name:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">from<\/span> \n    countries\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> \n    <span class=\"hljs-keyword\">name<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"213\" height=\"378\" src=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-countries.png\" alt=\"MariaDB Limit - countries\" class=\"wp-image-203\" srcset=\"https:\/\/www.mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-countries.png 213w, https:\/\/www.mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-countries-169x300.png 169w\" sizes=\"auto, (max-width: 213px) 100vw, 213px\" \/><\/figure>\n\n\n\n<p>To select only the first 5 countries, you add the <code>limit<\/code> clause to the above query:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">from<\/span> \n    countries\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">limit<\/span> <span class=\"hljs-number\">5<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"115\" height=\"124\" src=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-first-5-countries.png\" alt=\"MariaDB Limit - first 5 countries\" class=\"wp-image-201\"\/><\/figure>\n\n\n\n<p>To skip the first 5 countries and select the next 10 countries, you use the <code>offset<\/code> clause:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">from<\/span> \n    countries\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">limit<\/span> <span class=\"hljs-number\">10<\/span> <span class=\"hljs-keyword\">offset<\/span> <span class=\"hljs-number\">5<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"147\" height=\"232\" src=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-limit-10-offset-5.png\" alt=\"MariaDB Limit - limit 10 offset 5\" class=\"wp-image-202\"\/><\/figure>\n\n\n\n<p>The following query uses the alternative <code>limit<\/code> syntax:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">from<\/span> \n    countries\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">limit<\/span> <span class=\"hljs-number\">5<\/span>, <span class=\"hljs-number\">10<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">B) Using MariaDB limit clause to get the top-N rows example<\/h3>\n\n\n\n<p>The <code>limit<\/code> clause is very handy to make the top-N report e.g., the top 10 largest countries:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span>\n    <span class=\"hljs-keyword\">name<\/span>,\n    area\n<span class=\"hljs-keyword\">from<\/span>\n    countries\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> \n    area <span class=\"hljs-keyword\">desc<\/span>\n<span class=\"hljs-keyword\">limit<\/span> <span class=\"hljs-number\">10<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"244\" height=\"230\" src=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-top-10-largest-countries.png\" alt=\"MariaDB Limit - top 10 largest countries\" class=\"wp-image-204\"\/><\/figure>\n\n\n\n<p>In this example:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>First, sort the countries by areas from large to small.<\/li><li>Second, select only the first 10 countries.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">C) Using the MariaDB limit clause to select the nth row example<\/h3>\n\n\n\n<p>You can use the <code>limit<\/code> clause to get the <code>nth<\/code> row. For example, to get the 2nd largest country, you use the following statement:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">select<\/span>\n    <span class=\"hljs-keyword\">name<\/span>,\n    area\n<span class=\"hljs-keyword\">from<\/span>\n    countries\n<span class=\"hljs-keyword\">order<\/span> <span class=\"hljs-keyword\">by<\/span> \n    area, \n    <span class=\"hljs-keyword\">name<\/span>\n<span class=\"hljs-keyword\">limit<\/span> <span class=\"hljs-number\">1<\/span>,<span class=\"hljs-number\">1<\/span>;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"195\" height=\"37\" src=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/MariaDB-Limit-2nd-largest-country.png\" alt=\"MariaDB Limit - 2nd largest country\" class=\"wp-image-205\"\/><\/figure>\n\n\n\n<p>First, the query sorts countries by areas. Then, it skips the first row and picks the second one, which is the second largest country.<\/p>\n\n\n\n<p>Note that if two or more 2nd largest countries have the same area, the query can only return the first one.<\/p>\n\n\n\n<p>In this tutorial, you have learned how to use the MariaDB <code>limit<\/code> clause to specify the number of rows returned by a query.<\/p>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful ?<\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"199\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\"\n\t\t\t\tdata-post-title=\"MariaDB Limit\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"199\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\"\n\t\t\t\tdata-post-title=\"MariaDB Limit\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":95,"menu_order":7,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-199","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MariaDB Limit Offset Explained By Practical Examples<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MariaDB Limit Offset Explained By Practical Examples\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\" \/>\n<meta property=\"og:site_name\" content=\"MariaDB Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-11T16:24:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\",\"url\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\",\"name\":\"MariaDB Limit Offset Explained By Practical Examples\",\"isPartOf\":{\"@id\":\"https:\/\/www.mariadbtutorial.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png\",\"datePublished\":\"2019-10-05T10:02:59+00:00\",\"dateModified\":\"2020-04-11T16:24:10+00:00\",\"description\":\"In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#primaryimage\",\"url\":\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png\",\"contentUrl\":\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.mariadbtutorial.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MariaDB Basics\",\"item\":\"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MariaDB Limit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.mariadbtutorial.com\/#website\",\"url\":\"https:\/\/www.mariadbtutorial.com\/\",\"name\":\"MariaDB Tutorial\",\"description\":\"MariaDB Tutorial\",\"publisher\":{\"@id\":\"https:\/\/www.mariadbtutorial.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.mariadbtutorial.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.mariadbtutorial.com\/#organization\",\"name\":\"MariaDB Tutorial\",\"url\":\"https:\/\/www.mariadbtutorial.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.mariadbtutorial.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/06\/favicon.png\",\"contentUrl\":\"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/06\/favicon.png\",\"width\":512,\"height\":592,\"caption\":\"MariaDB Tutorial\"},\"image\":{\"@id\":\"https:\/\/www.mariadbtutorial.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MariaDB Limit Offset Explained By Practical Examples","description":"In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/","og_locale":"en_US","og_type":"article","og_title":"MariaDB Limit Offset Explained By Practical Examples","og_description":"In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.","og_url":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/","og_site_name":"MariaDB Tutorial","article_modified_time":"2020-04-11T16:24:10+00:00","og_image":[{"url":"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/","url":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/","name":"MariaDB Limit Offset Explained By Practical Examples","isPartOf":{"@id":"https:\/\/www.mariadbtutorial.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#primaryimage"},"image":{"@id":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#primaryimage"},"thumbnailUrl":"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png","datePublished":"2019-10-05T10:02:59+00:00","dateModified":"2020-04-11T16:24:10+00:00","description":"In this tutorial, you will learn how to use the MariaDB limit clause to specify the number of rows returned by a query.","breadcrumb":{"@id":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#primaryimage","url":"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png","contentUrl":"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/10\/countries.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/mariadb-limit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mariadbtutorial.com\/"},{"@type":"ListItem","position":2,"name":"MariaDB Basics","item":"https:\/\/www.mariadbtutorial.com\/mariadb-basics\/"},{"@type":"ListItem","position":3,"name":"MariaDB Limit"}]},{"@type":"WebSite","@id":"https:\/\/www.mariadbtutorial.com\/#website","url":"https:\/\/www.mariadbtutorial.com\/","name":"MariaDB Tutorial","description":"MariaDB Tutorial","publisher":{"@id":"https:\/\/www.mariadbtutorial.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mariadbtutorial.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mariadbtutorial.com\/#organization","name":"MariaDB Tutorial","url":"https:\/\/www.mariadbtutorial.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mariadbtutorial.com\/#\/schema\/logo\/image\/","url":"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/06\/favicon.png","contentUrl":"https:\/\/mariadbtutorial.com\/wp-content\/uploads\/2019\/06\/favicon.png","width":512,"height":592,"caption":"MariaDB Tutorial"},"image":{"@id":"https:\/\/www.mariadbtutorial.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/pages\/199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/comments?post=199"}],"version-history":[{"count":1,"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/pages\/199\/revisions"}],"predecessor-version":[{"id":761,"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/pages\/199\/revisions\/761"}],"up":[{"embeddable":true,"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/pages\/95"}],"wp:attachment":[{"href":"https:\/\/www.mariadbtutorial.com\/wp-json\/wp\/v2\/media?parent=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}