{"id":13717,"date":"2023-12-29T00:11:43","date_gmt":"2023-12-29T07:11:43","guid":{"rendered":"https:\/\/www.mysqltutorial.org\/?page_id=13717"},"modified":"2023-12-29T00:11:44","modified_gmt":"2023-12-29T07:11:44","slug":"mysql-select-from","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/","title":{"rendered":"MySQL SELECT FROM"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the basic form of the MySQL <code>SELECT FROM<\/code> statement to query data from a table.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to MySQL SELECT FROM statement<\/h2>\n\n\n\n<p>The <code>SELECT<\/code> statement allows you to select data from one or more tables. To write a <code>SELECT<\/code> statement in MySQL, you use this syntax:<\/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> table_name;<\/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\">\n<li>First, specify one or more columns from which you want to select data after the <code>SELECT<\/code> keyword. If the <code>select_list<\/code> has multiple columns, you need to separate them by a comma (<code>,<\/code>).<\/li>\n\n\n\n<li>Second, specify the name of the table from which you want to select data after the <code>FROM<\/code> keyword.<\/li>\n<\/ul>\n\n\n\n<p>The semicolon (<code>;<\/code>) is optional, which denotes the end of a statement. If you have two or more statements, you need to use the semicolon(<code>;)<\/code> to separate them so that MySQL will execute each statement individually.<\/p>\n\n\n\n<p>The <code>SELECT<\/code> and <code>FROM<\/code> are the keywords. By convention, you write the SQL keywords in uppercase. However, it&#8217;s not mandatory. Because SQL is case-insensitive, you can write the SQL statement in lowercase, uppercase, etc. For example:<\/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> select_list\n<span class=\"hljs-keyword\">from<\/span> table_name;<\/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>When executing the\u00a0<code>SELECT<\/code> statement, MySQL evaluates the <code>FROM<\/code>\u00a0clause before the <code>SELECT<\/code>\u00a0clause:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/MySQL-SELECT-FROM.svg\" alt=\"MySQL SELECT FROM\" class=\"wp-image-10796\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL SELECT FROM statement examples<\/h2>\n\n\n\n<p>We&#8217;ll use the <code>employees<\/code>&nbsp;table in the <a href=\"https:\/\/www.mysqltutorial.org\/getting-started-with-mysql\/mysql-sample-database\/\">sample database<\/a> for the following examples:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/employees.svg\" alt=\"\" class=\"wp-image-10759\"\/><\/figure>\n\n\n\n<p>The <code>employees<\/code> table has eight columns: employeeNumber, lastName, firstName, extension, email, officeCode, reportsTo, and jobTitle. <\/p>\n\n\n\n<p>The table also has many rows as shown in the following picture:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"339\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-employees-table.png\" alt=\"MySQL employees table\" class=\"wp-image-3781\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-employees-table.png 704w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2009\/12\/MySQL-employees-table-300x144.png 300w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">1) Using the SELECT FROM statement to retrieve data from a single column example<\/h3>\n\n\n\n<p>The following example uses the <code>SELECT FROM<\/code> statement to retrieve the last names of all employees:<\/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> lastName\n<span class=\"hljs-keyword\">FROM<\/span> employees;<\/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><a class=\"sql\" href=\"https:\/\/www.mysqltutorial.org\/tryit\/query\/mysql-select\/#1\" rel=\"noopener\">Try It Out<\/a><\/p>\n\n\n\n<p>Here&#8217;s the partial output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"plaintext\" data-shcb-language-slug=\"plaintext\"><span><code class=\"hljs language-plaintext\">+-----------+\n| lastName  |\n+-----------+\n| Murphy    |\n| Patterson |\n| Firrelli  |\n| Patterson |\n| Bondur    |\n| Bow       |\n| Jennings  |\n...\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">plaintext<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">plaintext<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The result of a <code>SELECT<\/code> statement is called a <strong>result set<\/strong> as it&#8217;s a set of rows that results from the query.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2) Using the SELECT FROM statement to query data from multiple columns example<\/h3>\n\n\n\n<p>The following example uses the <code>SELECT FROM<\/code> statement to get the first name, last name, and job title of employees:<\/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    lastName, \n    firstName, \n    jobTitle\n<span class=\"hljs-keyword\">FROM<\/span>\n    employees;<\/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.mysqltutorial.org\/tryit\/query\/mysql-select\/#2\" rel=\"noopener\">Try It Out<\/a><\/p>\n\n\n\n<p>Even though the&nbsp;<code>employees<\/code> table has many columns,&nbsp;the <code>SELECT<\/code> statement returns data of three columns <code>lastName<\/code>, <code>firstName<\/code>, and <code>jobTitle<\/code> specified in the <code>SELECT<\/code> clause:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"plaintext\" data-shcb-language-slug=\"plaintext\"><span><code class=\"hljs language-plaintext\">+-----------+-----------+----------------------+\n| lastname  | firstname | jobtitle             |\n+-----------+-----------+----------------------+\n| Murphy    | Diane     | President            |\n| Patterson | Mary      | VP Sales             |\n| Firrelli  | Jeff      | VP Marketing         |\n| Patterson | William   | Sales Manager (APAC) |\n| Bondur    | Gerard    | Sale Manager (EMEA)  |\n...<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">plaintext<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">plaintext<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">3) Using the SELECT FROM statement to retrieve data from all columns example<\/h3>\n\n\n\n<p>If you want to select data from all the columns of the <code>employees<\/code> table, you can specify all the column names in the <code>SELECT<\/code> clause like this:<\/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> employeeNumber,\n       lastName,\n       firstName,\n       extension,\n       email,\n       officeCode,\n       reportsTo,\n       jobTitle\n<span class=\"hljs-keyword\">FROM<\/span>   employees; <\/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>Alternatively, you can use the asterisk (*) which is the shorthand for all columns. For example:<\/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\">FROM<\/span> employees;<\/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<p><a class=\"sql\" href=\"https:\/\/www.mysqltutorial.org\/tryit\/query\/mysql-select\/#3\" rel=\"noopener\">Try It Out<\/a><\/p>\n\n\n\n<p>The query returns data from all the columns of the <code>employees<\/code> table.<\/p>\n\n\n\n<p>The <code>SELECT *<\/code> is often called &#8220;select star&#8221; or &#8220;select all&#8221; since it selects data from all columns of the table. In practice, you should use the <code>SELECT *<\/code> for the ad-hoc queries only. <\/p>\n\n\n\n<p>If you embed the <code>SELECT<\/code> statement in the code such as <a href=\"https:\/\/www.mysqltutorial.org\/php-mysql\/\">PHP<\/a>, <a href=\"https:\/\/www.mysqltutorial.org\/mysql-jdbc-tutorial\/\">Java<\/a>, <a href=\"https:\/\/www.mysqltutorial.org\/python-mysql\/\">Python<\/a>, and <a href=\"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/\">Node.js<\/a>, you should explicitly specify the columns from which you want to select data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use the <code>SELECT FROM<\/code> statement to select data from a table.<\/li>\n\n\n\n<li>Use the <code>SELECT *<\/code> to select data from all columns of a table.<\/li>\n<\/ul>\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=\"13717\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/\"\n\t\t\t\tdata-post-title=\"MySQL SELECT FROM\"\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=\"13717\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/\"\n\t\t\t\tdata-post-title=\"MySQL SELECT FROM\"\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>Summary: in this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query data from a table. Introduction to MySQL SELECT FROM statement The SELECT statement allows you to select data from one or more tables. To write a SELECT statement in MySQL, you use this syntax: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":174,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-13717","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MySQL SELECT FROM<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query the data from a 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.mysqltutorial.org\/mysql-basics\/mysql-select-from\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL SELECT FROM\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query the data from a table.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-29T07:11:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/MySQL-SELECT-FROM.svg\" \/>\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.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/\",\"name\":\"MySQL SELECT FROM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/MySQL-SELECT-FROM.svg\",\"datePublished\":\"2023-12-29T07:11:43+00:00\",\"dateModified\":\"2023-12-29T07:11:44+00:00\",\"description\":\"In this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query the data from a table.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/MySQL-SELECT-FROM.svg\",\"contentUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/MySQL-SELECT-FROM.svg\",\"caption\":\"MySQL SELECT FROM\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/mysql-select-from\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Basics\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-basics\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MySQL SELECT FROM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\",\"name\":\"MySQL Tutorial\",\"description\":\"A comprehensive MySQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mysqltutorial.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL SELECT FROM","description":"In this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query the data from a 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.mysqltutorial.org\/mysql-basics\/mysql-select-from\/","og_locale":"en_US","og_type":"article","og_title":"MySQL SELECT FROM","og_description":"In this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query the data from a table.","og_url":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/","og_site_name":"MySQL Tutorial","article_modified_time":"2023-12-29T07:11:44+00:00","og_image":[{"url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/MySQL-SELECT-FROM.svg","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/","url":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/","name":"MySQL SELECT FROM","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/#primaryimage"},"image":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/MySQL-SELECT-FROM.svg","datePublished":"2023-12-29T07:11:43+00:00","dateModified":"2023-12-29T07:11:44+00:00","description":"In this tutorial, you will learn how to use the basic form of the MySQL SELECT FROM statement to query the data from a table.","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/#primaryimage","url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/MySQL-SELECT-FROM.svg","contentUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2023\/10\/MySQL-SELECT-FROM.svg","caption":"MySQL SELECT FROM"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL Basics","item":"https:\/\/www.mysqltutorial.org\/mysql-basics\/"},{"@type":"ListItem","position":3,"name":"MySQL SELECT FROM"}]},{"@type":"WebSite","@id":"https:\/\/www.mysqltutorial.org\/#website","url":"https:\/\/www.mysqltutorial.org\/","name":"MySQL Tutorial","description":"A comprehensive MySQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mysqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/13717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/comments?post=13717"}],"version-history":[{"count":2,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/13717\/revisions"}],"predecessor-version":[{"id":13719,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/13717\/revisions\/13719"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/174"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=13717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}