{"id":96696,"date":"2020-11-04T11:00:00","date_gmt":"2020-11-04T09:00:00","guid":{"rendered":"https:\/\/examples.javacodegeeks.com\/?p=96696"},"modified":"2020-11-02T15:20:45","modified_gmt":"2020-11-02T13:20:45","slug":"sql-limit-clause-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/","title":{"rendered":"SQL LIMIT Clause Example"},"content":{"rendered":"<h2 class=\"wp-block-heading\" id=\"h-1-introduction\">1. Introduction<\/h2>\n<p>&nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-1-1-what-is-sql\">1.1 What is SQL?<\/h3>\n<p>SQL is also called \u201csequel\u201d and it stands for Structured Query Language. SQL first appeared in 1974 and Donald Chamberlin and Robert Boyce designed it.<\/p>\n<p>It is based upon relational algebra and tuple-relational calculus and is the programming language for programming and designing data stored in a Relational database management system (RDBMS).<\/p>\n<p>Depending upon the RDBMS used, the SQL can have dialects. Oracle uses PL\/SQL and MS SQL Server uses T-SQL and MySQL uses SQL.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-1-2-setup\">1.2 Setup<\/h3>\n<p>The setup we use for running examples is as follows:<\/p>\n<ul class=\"wp-block-list\">\n<li>MySQL Community Server version 8.0.22. To install, please visit the <a rel=\"noreferrer noopener\" href=\"https:\/\/dev.mysql.com\/downloads\/windows\/installer\/8.0.html\" target=\"_blank\">MySQL Community Downloads<\/a> page. The Documentation is available <a rel=\"noreferrer noopener\" href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/\" target=\"_blank\">here<\/a>.<\/li>\n<li>Workbench for running our queries which comes as a part of the community server download. Its documentation is available here.<\/li>\n<li>SAKILA Database is provided by MySQL itself. The documentation provides details about the structure, installation steps(if any), Schema details, etc.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-2-limit-clause\">2. LIMIT Clause<\/h2>\n<p>In this article, we will look at one of the SQL clauses called the Limit Clause. The LIMIT clause is used with the select clause is the last clause to execute. Its main purpose is to limit the number of records returned by the SELECT query.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-1-syntax\">2.1 Syntax<\/h3>\n<p>The LIMIT has 2 arguments. Both these arguments need to be 0 or some positive integer.<\/p>\n<pre class=\"brush:sql\">SELECT column_names\nFROM table_name(s)\nWhere [condition(s)]\nOrder by [expressions [ASC| DESC]]\nLIMIT [offset,] row_count; <\/pre>\n<p>offset: The offset is an optional argument. Its default value is 0.<\/p>\n<p>row_count: This argument tells us how many rows need to be returned.<\/p>\n<p>The default offset value is 0 and so the following 2 lines are equivalent<\/p>\n<pre class=\"brush:sql\">SELECT column_names\nFROM table_name(s)\nLIMIT 0, 10; <\/pre>\n<p><\/p>\n<p>AND<\/p>\n<p><\/p>\n<pre class=\"brush:sql\">SELECT column_names\nFROM table_name(s)\nLIMIT 10;\n<\/pre>\n<p>Here the <code> row_count =10 <\/code> i.e. the output has 10 lines starting with the first record.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<h2 class=\"wp-block-heading\" id=\"h-3-syntax-in-dialects\">3. Syntax in Dialects<\/h2>\n<p>The MySQL RDBMS uses the LIMIT Clause syntax as-is. Depending upon the RDBMS used, the syntax changes a little. Different RDBMs use different syntax<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-3-1-postgresql\">3.1 PostgreSQL<\/h3>\n<p>PostgreSQL interchanges the 2 arguments, and we have to specify the keyword OFFSET to give one.<\/p>\n<pre class=\"brush:sql\">SELECT column_name(s)\nFROM table_name(s)\nLIMIT row_count OFFSET offset;\n<\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-3-2-oracle\">3.2 Oracle<\/h3>\n<p>In Oracle we use a dialect called PL\/SQL. In PL\/SQL we use the Rownum clause to limit the number of records.<\/p>\n<pre class=\"brush:sql\">SELECT column_name(s)\nFROM table_name(s)\nWHERE ROWNUM &lt;= number;  \n<\/pre>\n<p>number = number of records to be returned.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-3-3-sql-server\">3.3 SQL server<\/h3>\n<p>One other syntax clause that is equivalent to LIMIT clause in mySQL is the TOP Clause. It is used in the SQL Server RDBMS<\/p>\n<pre class=\"brush:sql\">SELECT TOP number\nFROM table_name\nWHERE ROWNUM &lt;= number;\n<\/pre>\n<p>number = number of records to be returned.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-4-usage-examples\">4. Usage Examples<\/h2>\n<p>For understanding the LIMIT Clause in action, we will consider a scenario for a website<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-4-1-the-scenario-problem-statement\">4.1 The Scenario\/Problem Statement<\/h3>\n<p>Assume we have two dvd-rental stores. We wish to show all the films rented by a particular customer. There is a table which can show only 10 records at a time on the page.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-4-1-1-data\">4.1.1 Data<\/h4>\n<p>We will consider the database SAKILA. The tables used are PAYMENT, RENTAL, INVENTORY and FILM and the customer_id is 148. This customer has 46 records. Shown below are all the records for the customer 148<\/p>\n<p> Query used <\/p>\n<pre class=\"brush:sql\">SELECT ROW_NUMBER() OVER (ORDER BY F.TITLE) RECORD_NUMBER\n,F.TITLE, F.DESCRIPTION,F.LENGTH,F.RATING,P.AMOUNT,P.PAYMENT_DATE,I.STORE_ID\nFROM PAYMENT P,RENTAL R, INVENTORY I,FILM F\nWHERE P.CUSTOMER_ID = R.CUSTOMER_ID\nAND   P.RENTAL_ID = R.RENTAL_ID\nAND  R.INVENTORY_ID = I.INVENTORY_ID\nAND F.FILM_ID = I.FILM_ID\nAND P.CUSTOMER_ID = 148;\n<\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"815\" height=\"610\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/all_records.jpg\" alt=\"SQL LIMIT - All records for customer=148\" class=\"wp-image-96707\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/all_records.jpg 815w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/all_records-300x225.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/all_records-768x575.jpg 768w\" sizes=\"(max-width: 815px) 100vw, 815px\" \/><figcaption>All records for customer=148<\/figcaption><\/figure>\n<\/div>\n<h4 class=\"wp-block-heading\" id=\"h-4-1-2-limit-without-offset-limit-offset-to-default-0\">4.1.2 LIMIT without Offset \/LIMIT OFFSET TO DEFAULT(0)<\/h4>\n<p>For showing the First 10 records, we can use the LIMIT clause without the OFFSET clause and so we need the first 10 records i.e. records 1 to 10. The rowcount mentioned in the LIMIT is included in the records returned. Example if the rowcount is 10 then the output is 10 records.<\/p>\n<pre class=\"brush:sql\">SELECT ROW_NUMBER() OVER (ORDER BY F.TITLE) RECORD_NUMBER\n,F.TITLE, F.DESCRIPTION,F.LENGTH,F.RATING,P.AMOUNT,P.PAYMENT_DATE,I.STORE_ID\nFROM PAYMENT P,RENTAL R, INVENTORY I,FILM F\nWHERE P.CUSTOMER_ID = R.CUSTOMER_ID\nAND   P.RENTAL_ID = R.RENTAL_ID\nAND  R.INVENTORY_ID = I.INVENTORY_ID\nAND F.FILM_ID = I.FILM_ID\nAND P.CUSTOMER_ID = 148\nLIMIT 10;\n<\/pre>\n<p><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"810\" height=\"194\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_without_offset.jpg\" alt=\"SQL LIMIT - Limit without offset output\" class=\"wp-image-96708\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_without_offset.jpg 810w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_without_offset-300x72.jpg 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_without_offset-768x184.jpg 768w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><figcaption>Limit without offset output<\/figcaption><\/figure>\n<\/div>\n<p>The query above is equivalent to saying offset = 0 and row_count = 10 i.e. the query above is like writing LIMIT 0,10<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-4-1-3-limit-with-offset\">4.1.3 LIMIT WITH OFFSET<\/h4>\n<p>To get the next 10 records, we would require the below given Query. The output always starts from one record after the offset value. For example: if the offset given is 10, then the 11<sup>th<\/sup> record onwards will be returned. Essentially Offset is like saying \u201c<em>give me the records after the mentioned row number<\/em>\u201d. Visually we can think of this as follows:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"536\" height=\"375\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_offset_visual.png\" alt=\"SQL LIMIT - Limit Offset explanation\" class=\"wp-image-96709\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_offset_visual.png 536w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/limit_offset_visual-300x210.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><figcaption>Limit Offset explanation<\/figcaption><\/figure>\n<\/div>\n<p>Query to get the next 10 records is as follows<\/p>\n<pre class=\"brush:sql\">SELECT ROW_NUMBER() OVER (ORDER BY F.TITLE) RECORD_NUMBER\n,F.TITLE, F.DESCRIPTION,F.LENGTH,F.RATING,P.AMOUNT,P.PAYMENT_DATE,I.STORE_ID\nFROM PAYMENT P,RENTAL R, INVENTORY I,FILM F\nWHERE P.CUSTOMER_ID = R.CUSTOMER_ID\nAND   P.RENTAL_ID = R.RENTAL_ID\nAND  R.INVENTORY_ID = I.INVENTORY_ID\nAND F.FILM_ID = I.FILM_ID\nAND P.CUSTOMER_ID = 148\nLIMIT 10,10;\n<\/pre>\n<p><\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"820\" height=\"187\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/LIMIT_10_10_output.png\" alt=\"limit output with offset 10\" class=\"wp-image-96710\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/LIMIT_10_10_output.png 820w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/LIMIT_10_10_output-300x68.png 300w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/LIMIT_10_10_output-768x175.png 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><figcaption>limit output with offset 10<\/figcaption><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"h-5-summary\">5. Summary<\/h2>\n<p>In this article, we saw how to use the LIMIT CLAUSE in MySql using examples.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-6-download-the-source-code\">6. Download the Source Code<\/h2>\n<p>This was an example of the SQL LIMIT Clause using MySQL RDBMS.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/10\/Queries.zip\"><strong>SQL LIMIT Clause Example<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is also called \u201csequel\u201d and it stands for Structured Query Language. SQL first appeared in 1974 and Donald Chamberlin and Robert Boyce designed it. It is based &hellip;<\/p>\n","protected":false},"author":232,"featured_media":1204,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-96696","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL LIMIT Clause Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL LIMIT Clause Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-04T09:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Reshma Sathe\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Reshma Sathe\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\"},\"author\":{\"name\":\"Reshma Sathe\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/079aa9a12c7b8ebea3391ebeb6036a74\"},\"headline\":\"SQL LIMIT Clause Example\",\"datePublished\":\"2020-11-04T09:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\"},\"wordCount\":694,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"articleSection\":[\"sql\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\",\"name\":\"SQL LIMIT Clause Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"datePublished\":\"2020-11-04T09:00:00+00:00\",\"description\":\"1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"Bipartite Graph\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"sql\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"SQL LIMIT Clause Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/079aa9a12c7b8ebea3391ebeb6036a74\",\"name\":\"Reshma Sathe\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/08\/reshma_sathe-96x96.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/08\/reshma_sathe-96x96.png\",\"caption\":\"Reshma Sathe\"},\"description\":\"I am a recent Master of Computer Science degree graduate from the University Of Illinois at Urbana-Champaign.I have previously worked as a Software Engineer with projects ranging from production support to programming and software engineering.I am currently working on self-driven projects in Java, Python and Angular and also exploring other frontend and backend technologies.\",\"sameAs\":[\"www.linkedin.com\/in\/reshma-sathe\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/reshma-sathe\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL LIMIT Clause Example - Java Code Geeks","description":"1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is","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:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/","og_locale":"en_US","og_type":"article","og_title":"SQL LIMIT Clause Example - Java Code Geeks","og_description":"1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is","og_url":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2020-11-04T09:00:00+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","type":"image\/jpeg"}],"author":"Reshma Sathe","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Reshma Sathe","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/"},"author":{"name":"Reshma Sathe","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/079aa9a12c7b8ebea3391ebeb6036a74"},"headline":"SQL LIMIT Clause Example","datePublished":"2020-11-04T09:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/"},"wordCount":694,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","articleSection":["sql"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/","url":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/","name":"SQL LIMIT Clause Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","datePublished":"2020-11-04T09:00:00+00:00","description":"1. Introduction &nbsp; In this article, we will look at how to use the SQL LIMIT clause using various examples using MySQL RDBMS. 1.1 What is SQL? SQL is","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","width":150,"height":150,"caption":"Bipartite Graph"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/sql-limit-clause-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"sql","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/"},{"@type":"ListItem","position":5,"name":"SQL LIMIT Clause Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/079aa9a12c7b8ebea3391ebeb6036a74","name":"Reshma Sathe","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/08\/reshma_sathe-96x96.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2020\/08\/reshma_sathe-96x96.png","caption":"Reshma Sathe"},"description":"I am a recent Master of Computer Science degree graduate from the University Of Illinois at Urbana-Champaign.I have previously worked as a Software Engineer with projects ranging from production support to programming and software engineering.I am currently working on self-driven projects in Java, Python and Angular and also exploring other frontend and backend technologies.","sameAs":["www.linkedin.com\/in\/reshma-sathe"],"url":"https:\/\/examples.javacodegeeks.com\/author\/reshma-sathe\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/96696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/232"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=96696"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/96696\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1204"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=96696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=96696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=96696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}