{"id":14,"date":"2015-11-23T11:02:29","date_gmt":"2015-11-23T04:02:29","guid":{"rendered":"https:\/\/web.archive.org\/web\/20230707170429\/http:\/\/www.sqlitetutorial.net\/?page_id=14"},"modified":"2022-04-03T14:55:40","modified_gmt":"2022-04-03T07:55:40","slug":"sqlite-select","status":"publish","type":"page","link":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/","title":{"rendered":"SQLite Select"},"content":{"rendered":"\r\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use SQLite <code>SELECT<\/code> statement to query data from a single table.<\/p>\r\n\r\n\r\n\r\n<p>The <code>SELECT<\/code> statement is one of the most commonly used statements in SQL. The SQLite <code>SELECT<\/code> statement provides all features of the <code>SELECT<\/code> statement in SQL standard.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Simple uses of <code>SELECT<\/code> statement<\/h2>\r\n\r\n\r\n\r\n<p>You can use the <code>SELECT<\/code> statement to perform a simple calculation as follows:<\/p>\r\n\r\n\r\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>\t<span class=\"hljs-number\">1<\/span> + <span class=\"hljs-number\">1<\/span>;<\/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>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#1\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"71\" height=\"41\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg\" alt=\"SQLite SELECT simple calculation\" class=\"wp-image-127\"\/><\/figure>\r\n\r\n\r\n\r\n<p>You can use multiple expressions in the <code>SELECT<\/code> statement as follows:<\/p>\r\n\r\n\r\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\"><span class=\"hljs-keyword\">SELECT<\/span> \r\n   <span class=\"hljs-number\">10<\/span> \/ <span class=\"hljs-number\">5<\/span>, \r\n   <span class=\"hljs-number\">2<\/span> * <span class=\"hljs-number\">4<\/span> ;<\/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>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#2\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"128\" height=\"41\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-example.jpg\" alt=\"SQLite SELECT example\" class=\"wp-image-120\"\/><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Querying data from a table using the <code>SELECT<\/code> statement<\/h2>\r\n\r\n\r\n\r\n<p>We often use the <code>SELECT<\/code> statement to query data from one or more table. The syntax of the <code>SELECT<\/code> statement is as follows:<\/p>\r\n\r\n\r\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> <span class=\"hljs-keyword\">DISTINCT<\/span> column_list\r\n<span class=\"hljs-keyword\">FROM<\/span> table_list\r\n  <span class=\"hljs-keyword\">JOIN<\/span> <span class=\"hljs-keyword\">table<\/span> <span class=\"hljs-keyword\">ON<\/span> join_condition\r\n<span class=\"hljs-keyword\">WHERE<\/span> row_filter\r\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> <span class=\"hljs-keyword\">column<\/span>\r\n<span class=\"hljs-keyword\">LIMIT<\/span> <span class=\"hljs-keyword\">count<\/span> <span class=\"hljs-keyword\">OFFSET<\/span> <span class=\"hljs-keyword\">offset<\/span>\r\n<span class=\"hljs-keyword\">GROUP<\/span> <span class=\"hljs-keyword\">BY<\/span> <span class=\"hljs-keyword\">column<\/span>\r\n<span class=\"hljs-keyword\">HAVING<\/span> group_filter;<\/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>\r\n\r\n\r\n<p>The <code>SELECT<\/code> statement is the most complex statement in SQLite. To help easier to understand each part, we will break the <code>SELECT<\/code> statement into multiple easy-to-understand tutorials.<\/p>\r\n\r\n\r\n\r\n<ul><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-order-by\/\">ORDER BY clause<\/a> to sort the result set<\/li><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-select-distinct\">DISTINCT<\/a> clause to query unique rows in a table<\/li><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-where\/\">WHERE<\/a> clause to filter rows in the result set<\/li><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-limit\/\">LIMIT<\/a> OFFSET clauses to constrain the number of rows returned<\/li><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-inner-join\/\">INNER JOIN<\/a> or <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-left-join\/\">LEFT JOIN<\/a> to query data from multiple tables using join.<\/li><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-group-by\/\">GROUP BY<\/a> to get the group rows into groups and apply aggregate function for each group.<\/li><li>Use <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-having\/\">HAVING<\/a> clause to filter groups<\/li><\/ul>\r\n\r\n\r\n\r\n<p>In this tutorial, we are going to focus on the simplest form of the <code>SELECT<\/code> statement that allows you to query data from a single table.<\/p>\r\n\r\n\r\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> column_list\r\n<span class=\"hljs-keyword\">FROM<\/span> <span class=\"hljs-keyword\">table<\/span>;<\/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>\r\n\r\n\r\n<p>Even though the <code>SELECT<\/code> clause appears before the <code>FROM<\/code> clause, SQLite evaluates the <code>FROM<\/code> clause first and then the <code>SELECT<\/code> clause, therefore:<\/p>\r\n\r\n\r\n\r\n<ul><li>First, specify the table where you want to get data from in the <code>FROM<\/code> clause. Notice that you can have more than one table in the <code>FROM<\/code> clause. We will discuss it in the subsequent tutorial.<\/li><li>Second, specify a column or a list of comma-separated columns in the <code>SELECT<\/code> clause.<\/li><\/ul>\r\n\r\n\r\n\r\n<p>You use the semicolon (;) to terminate the statement.<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">SQLite <code>SELECT<\/code> examples<\/h3>\r\n\r\n\r\n\r\n<p>Let&#8217;s take a look at the <code>tracks<\/code> table in the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-sample-database\/\">sample database<\/a>.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"174\" height=\"224\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/tracks.png\" alt=\"\" class=\"wp-image-1558\"\/><\/figure>\r\n\r\n\r\n\r\n<p>The <code>tracks<\/code> table contains columns and rows. It looks like a spreadsheet.<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"699\" height=\"300\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-data.jpg\" alt=\"Tracks Table data\" class=\"wp-image-121\" srcset=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-data.jpg 699w, https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-data-300x129.jpg 300w\" sizes=\"(max-width: 699px) 100vw, 699px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>To get data from the tracks table such as trackid, track name, composer, and unit price, you use the following statement:<\/p>\r\n\r\n\r\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>\r\n\ttrackid,\r\n\t<span class=\"hljs-keyword\">name<\/span>,\r\n\tcomposer,\r\n\tunitprice\r\n<span class=\"hljs-keyword\">FROM<\/span>\r\n\ttracks;<\/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>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#3\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<p>You specify a list column names, which you want to get data, in the <code>SELECT<\/code> clause and the <code>tracks<\/code> table in the <code>FROM<\/code> clause. SQLite returns the following result:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-partial-data.jpg\"><img decoding=\"async\" loading=\"lazy\" width=\"710\" height=\"298\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-partial-data.jpg\" alt=\"Tracks Table partial data\" class=\"wp-image-122\" srcset=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-partial-data.jpg 710w, https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-partial-data-300x126.jpg 300w\" sizes=\"(max-width: 710px) 100vw, 710px\" \/><\/a><\/figure>\r\n\r\n\r\n\r\n<p>To get data from all columns, you specify the columns of the <code>tracks<\/code> table in the <code>SELECT<\/code> clause as follows:<\/p>\r\n\r\n\r\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>\r\n\ttrackid,\r\n\t<span class=\"hljs-keyword\">name<\/span>,\r\n\talbumid,\r\n\tmediatypeid,\r\n\tgenreid,\r\n\tcomposer,\r\n\tmilliseconds,\r\n\t<span class=\"hljs-keyword\">bytes<\/span>,\r\n\tunitprice\r\n<span class=\"hljs-keyword\">FROM<\/span>\r\n\ttracks;<\/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>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#4\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<p>For a table with many columns, the query would be so long that time-consuming to type. To avoid this, you can use the asterisk (*), which is the shorthand for all columns of the table as follows:<\/p>\r\n\r\n\r\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> * <span class=\"hljs-keyword\">FROM<\/span> tracks;<\/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>\r\n\r\n\r\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#5\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\r\n\r\n\r\n\r\n<p>The query is shorter and cleaner now.<\/p>\r\n\r\n\r\n\r\n<p>However&#8230;<\/p>\r\n\r\n\r\n\r\n<p>You should use the asterisk (*) for the testing purpose only, not in the real application development.<\/p>\r\n\r\n\r\n\r\n<p>Because&#8230;<\/p>\r\n\r\n\r\n\r\n<p>When you develop an application, you should control what SQLite returns to your application. Suppose, a table has 3 columns, and you use the asterisk (*) to retrieve the data from all three columns.<\/p>\r\n\r\n\r\n\r\n<p>What if someone removes a column, your application would not be working properly, because it assumes that there are three columns returned and the logic to process those three columns would be broken.<\/p>\r\n\r\n\r\n\r\n<p>If someone adds more columns, your application may work but it gets more data than needed, which creates more I\/O overhead between the database and application.<\/p>\r\n\r\n\r\n\r\n<p>So try to avoid using the asterisk (*) as a good habit when you use the <code>SELECT<\/code> statement.<\/p>\r\n\r\n\r\n\r\n<p>In this tutorial, you have learned how to use a simple form of the SQLite <code>SELECT<\/code> statement to query data from a single table.<\/p>\r\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=\"14\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\"\n\t\t\t\tdata-post-title=\"SQLite Select\"\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=\"14\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\"\n\t\t\t\tdata-post-title=\"SQLite Select\"\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<textarea class=\"wth-message\"><\/textarea>\n\t\t\t<input type=\"button\" name=\"wth-submit\" class=\"wth-btn wth-btn-submit\" id=\"wth-submit\" \/>\n\t\t\t<input type=\"button\" class=\"wth-btn wth-btn-cancel\" value=\"Cancel\" \/>\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use SQLite SELECT statement to query data from a single table.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQLite SELECT - Querying Data From a Single Table<\/title>\n<meta name=\"description\" content=\"This tutorial shows you how to use the simplest form of SQLite SELECT statement to query data from a single table.\" \/>\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.sqlitetutorial.net\/sqlite-select\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQLite SELECT - Querying Data From a Single Table\" \/>\n<meta property=\"og:description\" content=\"This tutorial shows you how to use the simplest form of SQLite SELECT statement to query data from a single table.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\" \/>\n<meta property=\"og:site_name\" content=\"SQLite Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-03T07:55:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\",\"url\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\",\"name\":\"SQLite SELECT - Querying Data From a Single Table\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/#website\"},\"datePublished\":\"2015-11-23T04:02:29+00:00\",\"dateModified\":\"2022-04-03T07:55:40+00:00\",\"description\":\"This tutorial shows you how to use the simplest form of SQLite SELECT statement to query data from a single table.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlitetutorial.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQLite Tutorial\",\"item\":\"https:\/\/www.sqlitetutorial.net\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQLite Select\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/#website\",\"url\":\"https:\/\/www.sqlitetutorial.net\/\",\"name\":\"SQLite Tutorial\",\"description\":\"A Step-by-step SQLite Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlitetutorial.net\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQLite SELECT - Querying Data From a Single Table","description":"This tutorial shows you how to use the simplest form of SQLite SELECT statement to query data from a single table.","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:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/","og_locale":"en_US","og_type":"article","og_title":"SQLite SELECT - Querying Data From a Single Table","og_description":"This tutorial shows you how to use the simplest form of SQLite SELECT statement to query data from a single table.","og_url":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/","og_site_name":"SQLite Tutorial","article_modified_time":"2022-04-03T07:55:40+00:00","og_image":[{"url":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg"}],"twitter_card":"summary","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/","url":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/","name":"SQLite SELECT - Querying Data From a Single Table","isPartOf":{"@id":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/#website"},"datePublished":"2015-11-23T04:02:29+00:00","dateModified":"2022-04-03T07:55:40+00:00","description":"This tutorial shows you how to use the simplest form of SQLite SELECT statement to query data from a single table.","breadcrumb":{"@id":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/sqlite-select\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/"},{"@type":"ListItem","position":2,"name":"SQLite Tutorial","item":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/"},{"@type":"ListItem","position":3,"name":"SQLite Select"}]},{"@type":"WebSite","@id":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/#website","url":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/","name":"SQLite Tutorial","description":"A Step-by-step SQLite Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/14"}],"collection":[{"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":1,"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":2764,"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/14\/revisions\/2764"}],"up":[{"embeddable":true,"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/media?parent=14"}],"curies":[{"name":"wp","href":"https:\/\/web.archive.org\/web\/20230707170429\/https:\/\/api.w.org\/{rel}","templated":true}]}}