{"id":14,"date":"2015-11-23T11:02:29","date_gmt":"2015-11-23T04:02:29","guid":{"rendered":"http:\/\/www.sqlitetutorial.net\/?page_id=14"},"modified":"2024-04-16T11:21:32","modified_gmt":"2024-04-16T04:21:32","slug":"sqlite-select","status":"publish","type":"page","link":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/","title":{"rendered":"SQLite Select"},"content":{"rendered":"\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>\n\n\n\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>\n\n\n\n<h2 class=\"wp-block-heading\">Simple uses of SELECT statement<\/h2>\n\n\n\n<p>The following example show how to use the <code>SELECT<\/code> statement to perform a simple calculation:<\/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>\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>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#1\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" 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>\n\n\n\n<p>You can use multiple expressions in the <code>SELECT<\/code> statement 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\"><span class=\"hljs-keyword\">SELECT<\/span> \n   <span class=\"hljs-number\">10<\/span> \/ <span class=\"hljs-number\">5<\/span>, \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>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#2\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" 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>\n\n\n\n<h2 class=\"wp-block-heading\">Querying data from a table using the SELECT statement<\/h2>\n\n\n\n<p>We often use the <code>SELECT<\/code> statement to query data from one or more tables. <\/p>\n\n\n\n<p>Here&#8217;s the syntax of the <code>SELECT<\/code> statement:<\/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> <span class=\"hljs-keyword\">DISTINCT<\/span> column_list\n<span class=\"hljs-keyword\">FROM<\/span> table_list\n  <span class=\"hljs-keyword\">JOIN<\/span> <span class=\"hljs-keyword\">table<\/span> <span class=\"hljs-keyword\">ON<\/span> join_condition\n<span class=\"hljs-keyword\">WHERE<\/span> row_filter\n<span class=\"hljs-keyword\">ORDER<\/span> <span class=\"hljs-keyword\">BY<\/span> <span class=\"hljs-keyword\">column<\/span>\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>\n<span class=\"hljs-keyword\">GROUP<\/span> <span class=\"hljs-keyword\">BY<\/span> <span class=\"hljs-keyword\">column<\/span>\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>\n\n\n<p>The <code>SELECT<\/code> statement is the most complex statement in SQLite. To make it easier to understand each part, we will break the <code>SELECT<\/code> statement into multiple easy-to-understand tutorials.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-order-by\/\">ORDER BY clause<\/a> to sort the result set.<\/li>\n\n\n\n<li>Use the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-select-distinct\">DISTINCT<\/a> clause to query unique rows in a table.<\/li>\n\n\n\n<li>Use the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-where\/\">WHERE<\/a> clause to filter rows in the result set.<\/li>\n\n\n\n<li>Use the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-limit\/\">LIMIT<\/a> OFFSET clause to constrain the number of rows returned.<\/li>\n\n\n\n<li>Use the <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>\n\n\n\n<li>Use the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-group-by\/\">GROUP BY<\/a> clause to group rows into groups and apply <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-aggregate-functions\/\">aggregate functions<\/a> to each group.<\/li>\n\n\n\n<li>Use the <a href=\"https:\/\/www.sqlitetutorial.net\/sqlite-having\/\">HAVING<\/a> clause to filter groups.<\/li>\n<\/ul>\n\n\n\n<p>In this tutorial, we&#8217;ll focus on the simplest form of the <code>SELECT<\/code> statement that allows you to query data from a single table:<\/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> column_list\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>\n\n\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>\n\n\n\n<ul class=\"wp-block-list\">\n<li>First, specify the table from which you want to get data in the <code>FROM<\/code> clause. Notice that you can have more than one table in the <code>FROM<\/code> clause. We&#8217;ll discuss it in the subsequent tutorial.<\/li>\n\n\n\n<li>Second, specify a column or a list of comma-separated columns in the <code>SELECT<\/code> clause.<\/li>\n<\/ul>\n\n\n\n<p>You use the semicolon (;) to terminate the statement.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SQLite SELECT examples<\/h3>\n\n\n\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>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"174\" height=\"224\" src=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2018\/11\/tracks.png\" alt=\"\" class=\"wp-image-1558\"\/><\/figure>\n\n\n\n<p>The <code>tracks<\/code> table contains columns and rows. It looks like a spreadsheet.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" 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=\"auto, (max-width: 699px) 100vw, 699px\" \/><\/figure>\n\n\n\n<p>To get data from the tracks table such as trackid, track name, composer, and unit price, you use the following statement:<\/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\ttrackid,\n\t<span class=\"hljs-keyword\">name<\/span>,\n\tcomposer,\n\tunitprice\n<span class=\"hljs-keyword\">FROM<\/span>\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>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#3\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\n\n\n\n<p>You specify a list column names, from 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>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/Tracks-Table-partial-data.jpg\"><img loading=\"lazy\" decoding=\"async\" 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=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/a><\/figure>\n\n\n\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>\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\ttrackid,\n\t<span class=\"hljs-keyword\">name<\/span>,\n\talbumid,\n\tmediatypeid,\n\tgenreid,\n\tcomposer,\n\tmilliseconds,\n\t<span class=\"hljs-keyword\">bytes<\/span>,\n\tunitprice\n<span class=\"hljs-keyword\">FROM<\/span>\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>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#4\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\n\n\n\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>\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> * <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>\n\n\n<p><a class=\"sql\" href=\"https:\/\/www.sqlitetutorial.net\/tryit\/query\/sqlite-select\/#5\" target=\"_blank\" rel=\"noopener noreferrer\">Try It<\/a><\/p>\n\n\n\n<p>The query is shorter and cleaner now.<\/p>\n\n\n\n<p>However&#8230;<\/p>\n\n\n\n<p>You should use the asterisk (*) for testing purposes only, not in the application development.<\/p>\n\n\n\n<p>Because&#8230;<\/p>\n\n\n\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>\n\n\n\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>\n\n\n\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>\n\n\n\n<p>So try to avoid using the asterisk (*) as a good habit when you use the <code>SELECT<\/code> statement.<\/p>\n\n\n\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>\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\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 SQLite SELECT statement to query data from a single table.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-14","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>SQLite SELECT Statement<\/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 Statement\" \/>\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=\"2024-04-16T04:21:32+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_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427\"},\"headline\":\"SQLite Select\",\"datePublished\":\"2015-11-23T04:02:29+00:00\",\"dateModified\":\"2024-04-16T04:21:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\"},\"wordCount\":600,\"image\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\",\"url\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/\",\"name\":\"SQLite SELECT Statement\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg\",\"datePublished\":\"2015-11-23T04:02:29+00:00\",\"dateModified\":\"2024-04-16T04:21:32+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\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage\",\"url\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg\",\"contentUrl\":\"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg\",\"width\":71,\"height\":41},{\"@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 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\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427\",\"name\":\"admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQLite SELECT Statement","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:\/\/www.sqlitetutorial.net\/sqlite-select\/","og_locale":"en_US","og_type":"article","og_title":"SQLite SELECT Statement","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:\/\/www.sqlitetutorial.net\/sqlite-select\/","og_site_name":"SQLite Tutorial","article_modified_time":"2024-04-16T04:21:32+00:00","og_image":[{"url":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#article","isPartOf":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/"},"author":{"name":"admin","@id":"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427"},"headline":"SQLite Select","datePublished":"2015-11-23T04:02:29+00:00","dateModified":"2024-04-16T04:21:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/"},"wordCount":600,"image":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/","url":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/","name":"SQLite SELECT Statement","isPartOf":{"@id":"https:\/\/www.sqlitetutorial.net\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage"},"image":{"@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg","datePublished":"2015-11-23T04:02:29+00:00","dateModified":"2024-04-16T04:21:32+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":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlitetutorial.net\/sqlite-select\/#primaryimage","url":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg","contentUrl":"https:\/\/www.sqlitetutorial.net\/wp-content\/uploads\/2015\/11\/SQLite-SELECT-simple-calculation.jpg","width":71,"height":41},{"@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 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":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlitetutorial.net\/#\/schema\/person\/6d69b968cad0102e30d6694ed8dc6427","name":"admin"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":5,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":3206,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/14\/revisions\/3206"}],"up":[{"embeddable":true,"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/www.sqlitetutorial.net\/wp-json\/wp\/v2\/media?parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}