{"id":5765,"date":"2017-06-15T00:19:16","date_gmt":"2017-06-15T07:19:16","guid":{"rendered":"http:\/\/www.mysqltutorial.org\/?page_id=5765"},"modified":"2024-01-03T17:56:46","modified_gmt":"2024-01-04T00:56:46","slug":"create-table","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/","title":{"rendered":"Creating Tables in MySQL from Node.js"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to create a new table in MySQL database from a Node.js application.<\/p>\n\n\n\n<p class=\"note\">This tutorial picks up where the <a href=\"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/connect\/\">connecting to the MySQL Database Server from the Node.js<\/a> tutorial left off.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating tables<\/h2>\n\n\n\n<p>To create a table from Node.js, you use these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/connect\/\">Connect to the MySQL database server.<\/a><\/li>\n\n\n\n<li>Call the <code>query()<\/code> method on the <code>connection<\/code> object to execute a <a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-create-table\/\"><code>CREATE TABLE<\/code><\/a> statement.<\/li>\n\n\n\n<li>Close the database connection.<\/li>\n<\/ol>\n\n\n\n<p>Create a new file called <code>create_table.js<\/code> in the project directory and add the following code to the file:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">let<\/span> mysql = <span class=\"hljs-built_in\">require<\/span>(<span class=\"hljs-string\">'mysql'<\/span>);\n\n<span class=\"hljs-keyword\">let<\/span> connection = mysql.createConnection({\n  <span class=\"hljs-attr\">host<\/span>: process.env.DB_HOST,\n  <span class=\"hljs-attr\">port<\/span>: process.env.DB_PORT,\n  <span class=\"hljs-attr\">user<\/span>: process.env.DB_USER,\n  <span class=\"hljs-attr\">password<\/span>: process.env.DB_PASSWORD,\n  <span class=\"hljs-attr\">database<\/span>: process.env.DB_NAME,\n});\n\n<span class=\"hljs-comment\">\/\/ connect to the MySQL server<\/span>\nconnection.connect(<span class=\"hljs-function\">(<span class=\"hljs-params\">err<\/span>) =&gt;<\/span> {\n  <span class=\"hljs-keyword\">if<\/span> (err) <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-built_in\">console<\/span>.error(err.message);\n\n  <span class=\"hljs-keyword\">const<\/span> createTodosTable = <span class=\"hljs-string\">`create table if not exists todos(\n                          id int primary key auto_increment,\n                          title varchar(255) not null,\n                          completed bool not null default false\n                      )`<\/span>;\n\n  connection.query(createTodosTable, (err, results, fields) =&gt; {\n    <span class=\"hljs-keyword\">if<\/span> (err) <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-built_in\">console<\/span>.log(err.message);\n  });\n\n  <span class=\"hljs-comment\">\/\/ close the connection<\/span>\n  connection.end(<span class=\"hljs-function\">(<span class=\"hljs-params\">err<\/span>) =&gt;<\/span> {\n    <span class=\"hljs-keyword\">if<\/span> (err) <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-built_in\">console<\/span>.log(err.message);\n  });\n});\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>How it works.<\/p>\n\n\n\n<p>First, use the <code>mysql<\/code> module to connect to the MySQL server:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">let<\/span> mysql = <span class=\"hljs-built_in\">require<\/span>(<span class=\"hljs-string\">'mysql'<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Second, create a database connection with the parameters come from the <code>.env<\/code> configuration file:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">let<\/span> connection = mysql.createConnection({\n  <span class=\"hljs-attr\">host<\/span>: process.env.DB_HOST,\n  <span class=\"hljs-attr\">port<\/span>: process.env.DB_PORT,\n  <span class=\"hljs-attr\">user<\/span>: process.env.DB_USER,\n  <span class=\"hljs-attr\">password<\/span>: process.env.DB_PASSWORD,\n  <span class=\"hljs-attr\">database<\/span>: process.env.DB_NAME,\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here&#8217;s the contents of the <code>.env<\/code> file:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">DB_HOST=localhost\nDB_PORT=3306\nDB_USER=user\nDB_PASSWORD=password\nDB_NAME=todoapp<\/code><\/span><\/pre>\n\n\n<p>Third, connect to the MySQL server:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">connection.end(<span class=\"hljs-function\">(<span class=\"hljs-params\">err<\/span>) =&gt;<\/span> {\n  <span class=\"hljs-keyword\">if<\/span> (err) <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-built_in\">console<\/span>.log(err.message);\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>If an error occurs when making a connection to the database, display the error message.<\/p>\n\n\n\n<p>Fourth, define an SQL query to create a table named todos. The <code>todos<\/code> table has three columns:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>id<\/code> is the <a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-auto_increment\/\">auto-increment<\/a> primary key.<\/li>\n\n\n\n<li><code>title<\/code> is the todo&#8217;s title with a maximum length of 255.<\/li>\n\n\n\n<li><code>completed<\/code> is a boolean value that indicates the status of the <code>todo<\/code>. It defaults to <code>false<\/code>.<\/li>\n<\/ul>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-keyword\">const<\/span> createTodosTable = <span class=\"hljs-string\">`create table if not exists todos(\n                          id int primary key auto_increment,\n                          title varchar(255)not null,\n                          completed bool not null default false\n                      )`<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Fifth, execute the <code><a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-create-table\/\">CREATE TABLE<\/a><\/code> statement using the <code>query()<\/code> method:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">connection.query(createTodosTable, <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> (<span class=\"hljs-params\">err, results, fields<\/span>) <\/span>{\n  <span class=\"hljs-keyword\">if<\/span> (err) <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-built_in\">console<\/span>.log(err.message);\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>query()<\/code> method accepts an SQL statement and a callback. The callback function takes three arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>error<\/code>: stores the detailed error if an error occurred during the execution of the statement.<\/li>\n\n\n\n<li><code>results<\/code>: holds the results of the query.<\/li>\n\n\n\n<li><code>fields<\/code>: holds results field information if any.<\/li>\n<\/ul>\n\n\n\n<p>Finally, close the connection to the database:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\"><span class=\"hljs-comment\">\/\/ close the connection<\/span>\nconnection.end(<span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> (<span class=\"hljs-params\">err<\/span>) <\/span>{\n  <span class=\"hljs-keyword\">if<\/span> (err) <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-built_in\">console<\/span>.log(err.message);\n});<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To execute the program that uses the <code>.env<\/code>, you use the following command:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">node --env-file .env create_table.js<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Verifying the table creation<\/h2>\n\n\n\n<p>First, open the Command Prompt on Windows or Terminal on Unix-like systems and connect to the MySQL Server:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">mysql -h host -u root -p todoapp;<\/code><\/span><\/pre>\n\n\n<p>Second, list all tables in the <code>todoapp<\/code> database:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">show tables;<\/code><\/span><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">+-------------------+\n| Tables_in_todoapp |\n+-------------------+\n| todos             |\n+-------------------+\n<span class=\"hljs-number\">1<\/span> row <span class=\"hljs-keyword\">in<\/span> <span class=\"hljs-keyword\">set<\/span> (0.00 sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this tutorial, you have learned how to create a new table in a MySQL database.<\/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=\"5765\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/\"\n\t\t\t\tdata-post-title=\"Creating Tables in MySQL from Node.js\"\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=\"5765\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/\"\n\t\t\t\tdata-post-title=\"Creating Tables in MySQL from Node.js\"\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 create a new table in a MySQL database from a node.js application by using the mysql module.<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":5759,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5765","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>Creating Tables in MySQL from Node.js<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn how to create a new table in a MySQL database from a node.js application by using the mysql module.\" \/>\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-nodejs\/create-table\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating Tables in MySQL from Node.js\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn how to create a new table in a MySQL database from a node.js application by using the mysql module.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-04T00:56:46+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-nodejs\\\/create-table\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-nodejs\\\/create-table\\\/\",\"name\":\"Creating Tables in MySQL from Node.js\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"datePublished\":\"2017-06-15T07:19:16+00:00\",\"dateModified\":\"2024-01-04T00:56:46+00:00\",\"description\":\"In this tutorial, you will learn how to create a new table in a MySQL database from a node.js application by using the mysql module.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-nodejs\\\/create-table\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-nodejs\\\/create-table\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-nodejs\\\/create-table\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Node.js\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-nodejs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Creating Tables in MySQL from Node.js\"}]},{\"@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":"Creating Tables in MySQL from Node.js","description":"In this tutorial, you will learn how to create a new table in a MySQL database from a node.js application by using the mysql module.","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-nodejs\/create-table\/","og_locale":"en_US","og_type":"article","og_title":"Creating Tables in MySQL from Node.js","og_description":"In this tutorial, you will learn how to create a new table in a MySQL database from a node.js application by using the mysql module.","og_url":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/","og_site_name":"MySQL Tutorial","article_modified_time":"2024-01-04T00:56:46+00:00","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/","url":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/","name":"Creating Tables in MySQL from Node.js","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"datePublished":"2017-06-15T07:19:16+00:00","dateModified":"2024-01-04T00:56:46+00:00","description":"In this tutorial, you will learn how to create a new table in a MySQL database from a node.js application by using the mysql module.","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/create-table\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL Node.js","item":"https:\/\/www.mysqltutorial.org\/mysql-nodejs\/"},{"@type":"ListItem","position":3,"name":"Creating Tables in MySQL from Node.js"}]},{"@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\/5765","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=5765"}],"version-history":[{"count":5,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/5765\/revisions"}],"predecessor-version":[{"id":14090,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/5765\/revisions\/14090"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/5759"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=5765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}