{"id":1971,"date":"2018-03-26T12:44:20","date_gmt":"2018-03-26T12:44:20","guid":{"rendered":"https:\/\/data36.com\/?p=1971"},"modified":"2022-05-11T21:51:15","modified_gmt":"2022-05-11T21:51:15","slug":"create-table-sql","status":"publish","type":"post","link":"https:\/\/data36.com\/create-table-sql\/","title":{"rendered":"How to Create a Table in SQL"},"content":{"rendered":"\n<p>Working with SQL for data analysis sometimes requires creating new tables. Do you want to store the output of your SQL queries? Do you need to pull new data sources (eg. csv files) into your analyses? Do you want to store your transformed and cleaned data without deleting your original data sets? First, you have to know how to create new tables in SQL!<\/p>\n\n\n\n<p>In this article I&#8217;ll show you the <code>CREATE TABLE<\/code> SQL statement, the syntax, and the different column parameters that you have to set. And at the end of the article, you can immediately continue to the next article where you can learn how to import data into these SQL tables.<\/p>\n\n\n\n<p><em>Note: This is going to be a practical tutorial, so I encourage you to do the coding part with me.<\/em><\/p>\n\n\n\n<p><em>Note 2: If you are new here, let\u2019s start with these SQL articles first:<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/data36.com\/data-coding-101-install-python-sql-r-bash\/\"><em>How to install Python, SQL, R and Bash (for non-devs)<\/em><\/a><\/li><li><a href=\"https:\/\/data36.com\/sql-for-data-analysis-tutorial-beginners\/\"><em>SQL for Data Analysis \u2013 Tutorial for Beginners \u2013 ep1<\/em><\/a><\/li><li><a href=\"https:\/\/data36.com\/install-sql-workbench-postgresql\/\"><em>How to install SQL Workbench for postgreSQL<\/em><\/a><\/li><\/ol>\n\n\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"6935\" class=\"elementor elementor-6935\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6d6c325e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6d6c325e\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ff17a5b\" data-id=\"ff17a5b\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a8e0a54 elementor-widget elementor-widget-heading\" data-id=\"a8e0a54\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">How to Become a Data Scientist<br>(free 50-minute video course by Tomi Mester)<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-470bc82d elementor-widget elementor-widget-text-editor\" data-id=\"470bc82d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"color: var( --e-global-color-text ); font-family: 'PT Serif'; font-size: 1em; word-spacing: var( --e-global-typography-text-word-spacing );\">Just subscribe to the Data36 Newsletter here (it&#8217;s free)!<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4daf807 elementor-widget elementor-widget-html\" data-id=\"4daf807\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n.ml-form-checkboxRow label.checkbox {\n    margin-top: 20px;\n  display: flex;\n  align-items: flex-start; \/* Aligns items at the start (top) *\/\n}\n.ml-form-checkboxRow label.checkbox input[type=\"checkbox\"] {\n  margin-top: 5px;\n  margin-right: 10px; \/* Adjusts space between the checkbox and the text, ensuring the checkbox aligns at the start of the text *\/\n}\n\n\n.ml-form-embedSubmit {\n  text-align: center; \/* Centers inline or inline-block elements horizontally *\/\n  margin-top: 30px;\n  margin-bottom: 40px;\n}\n<\/style>\n\n<div id=\"mlb2-13389319\" class=\"ml-form-embedContainer ml-subscribe-form ml-subscribe-form-13389319\">\n      <div class=\"ml-form-align-center \">\n        <div class=\"ml-form-embedWrapper embedForm\">\n\n          \n          \n\n          <div class=\"ml-form-embedBody ml-form-embedBodyDefault row-form\">\n\n            <div class=\"ml-form-embedContent\" style=\"margin-bottom: 0px; \">\n              \n            <\/div>\n\n            <form class=\"ml-block-form\" action=\"https:\/\/assets.mailerlite.com\/jsonp\/876500\/forms\/116418002614748567\/subscribe\" data-code=\"\" method=\"post\" target=\"_blank\">\n              <div class=\"ml-form-formContent\">\n                \n\n                  \n                  <div class=\"ml-form-fieldRow ml-last-item\">\n                    <div class=\"ml-field-group ml-field-email ml-validate-email ml-validate-required\">\n\n                      \n\n\n                      <!-- input -->\n                      <input aria-label=\"email\" aria-required=\"true\" type=\"email\" class=\"form-control\" data-inputmask=\"\" name=\"fields[email]\" placeholder=\"Email\" autocomplete=\"email\">\n                      <!-- \/input -->\n\n                      <!-- textarea -->\n                      \n                      <!-- \/textarea -->\n\n                      <!-- select -->\n                      \n                      <!-- \/select -->\n\n                      <!-- checkboxes -->\n            \n            <!-- \/checkboxes -->\n\n                      <!-- radio -->\n                      \n                      <!-- \/radio -->\n\n                      <!-- countries -->\n                      \n                      <!-- \/countries -->\n\n\n\n\n\n                    <\/div>\n                  <\/div>\n                \n              <\/div>\n\n              \n\n              <!-- Privacy policy -->\n              \n              <!-- \/Privacy policy -->\n\n              \n\n              \n\n              <div class=\"ml-form-checkboxRow ml-validate-required\">\n                \n                  <label class=\"checkbox\">\n                    <input type=\"checkbox\">\n                    <div class=\"label-description\">\n                      <p>I accept Data36's <a href=\"https:\/\/data36.com\/privacy-policy\/\">Privacy Policy<\/a>. (No spam. Only useful data science related content. When you subscribe, I\u2019ll keep you updated with a couple emails per week. You'll get articles, courses, cheatsheets, tutorials and many cool stuff.)<\/p>\n                    <\/div>\n                  <\/label>\n                \n              <\/div>\n\n\n\n\n\n\n              \n              <input type=\"hidden\" name=\"ml-submit\" value=\"1\">\n\n              <div class=\"ml-form-embedSubmit\">\n                \n                  <button type=\"submit\" class=\"primary\">Get Access Now!<\/button>\n                \n                <button disabled=\"disabled\" style=\"display: none;\" type=\"button\" class=\"loading\">\n                  <div class=\"ml-form-embedSubmitLoad\"><\/div>\n                  <span class=\"sr-only\">Loading...<\/span>\n                <\/button>\n              <\/div>\n\n              \n              <input type=\"hidden\" name=\"anticsrf\" value=\"true\">\n            <\/form>\n          <\/div>\n\n          <div class=\"ml-form-successBody row-success\" style=\"display: none\">\n\n            <div class=\"ml-form-successContent\">\n              \n                <h4>Thank you!<\/h4>\n                \n                  <p>You have successfully joined our subscriber list.<\/p>\n                \n              \n            <\/div>\n\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n\n  \n\n  \n  <script>\n    function ml_webform_success_13389319() {\n    try {\n        window.top.location.href = 'https:\/\/data36.com\/data36-inner-circle-subscription\/';\n      } catch (e) {\n        window.location.href = 'https:\/\/data36.com\/data36-inner-circle-subscription\/';\n      }\n    }\n      <\/script>\n  \n  \n  \n      <script src=\"https:\/\/groot.mailerlite.com\/js\/w\/webforms.min.js?v2d8fb22bb5b3677f161552cd9e774127\" type=\"text\/javascript\"><\/script>\n        <script>\n            fetch(\"https:\/\/assets.mailerlite.com\/jsonp\/876500\/forms\/116418002614748567\/takel\")\n        <\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n\n\n\n<h2 class=\"wp-block-heading\">Data Types in SQL<\/h2>\n\n\n\n<p>Before we dig deeper into how to create new tables, we have to talk about a conceptual element of SQL: <strong>the different data types<\/strong>.<\/p>\n\n\n\n<p>Let&#8217;s see what sorts of data we can put into an SQL table!<\/p>\n\n\n\n<p><em>Note: in the current version of PostgreSQL there are more than <a href=\"https:\/\/www.postgresql.org\/docs\/current\/static\/datatype.html\">40 different data types<\/a>. Here, I&#8217;ll introduce only the seven most important ones.<\/em><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Integer<\/strong>. A whole number without a fractional part. Eg. <code>1<\/code>, <code>156<\/code>, <code>2012412<\/code><\/li><li><strong>Decimal<\/strong>. A number with a fractional part. Eg. <code>3.14<\/code>, <code>3.141592654<\/code>, <code>961.1241250<\/code><\/li><li><strong>Boolean<\/strong>. A binary value. It can be either <code>TRUE<\/code> or <code>FALSE<\/code>.<\/li><li><strong>Date<\/strong>. Speaks for itself. You can also choose the format. Eg. <code>2017-12-31<\/code><\/li><li><strong>Time<\/strong>. You can decide the format of this, as well. Eg. <code>23:59:59<\/code><\/li><li><strong>Timestamp<\/strong>. The date and the time together. Eg. <code>2017-12-31 23:59:59<\/code><\/li><li><strong>Text<\/strong>. This is the most general data type. But it can be alphabetical letters only, or a mix of letters and numbers and any other characters. Eg. <code>hello<\/code>, <code>R2D2<\/code>, <code>Tomi<\/code>, <code>124.56.128.41<\/code><\/li><\/ol>\n\n\n\n<p>Why is this so important?<\/p>\n\n\n\n<p>Because when you create a new SQL table, you have to define which data type you will have in each column. And once it&#8217;s defined, you have to stick with it. For instance, if you set a new column with an <strong>Integer<\/strong> data type, you won&#8217;t be able to include text or dates or anything else. This means that you should be conscious about data types and also design your data tables (and databases) before you actually create them!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The CREATE TABLE statement<\/h2>\n\n\n\n<p>You can create a new table by using the <code>CREATE TABLE<\/code> SQL statement. This is how it looks:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE new_table_name\n(\n  first_column    first_column_data_type,\n  second_column   second_column_data_type,\n  third_column    third_column_data_type,\n\u2026\n  last_column     last_column_data_type\n);\n<\/pre>\n\n\n\n<p><code>CREATE TABLE<\/code> is the SQL keyword. You should always have it at the beginning of your SQL statement.<\/p>\n\n\n\n<p>Next, the <code>new_table_name<\/code> will be the name of your freshly created table. It can be whatever you prefer. I recommend coming up with a simple and meaningful name. I also suggest using lowercase. (It doesn&#8217;t really matter though; our current postgreSQL setup is not case-sensitive for table names. But I think it&#8217;s nicer and more transparent that way.)<\/p>\n\n\n\n<p>The <code>first_column<\/code>, <code>second_column<\/code>, <code>last_column<\/code>, etc. will be the names of the new columns in the new table. The same applies to them as to the <code>new_table_name<\/code>: simple and meaningful names in lowercase are the best.<\/p>\n\n\n\n<p>And here comes the trick &#8211; or at least the unusual thing &#8211; for every column, you have to specify the data type. As you see, after the <code>first_column<\/code> there is a <code>first_column_data_type<\/code>. This could be <strong>Text<\/strong>, for instance. But if you wanted to fill it with numbers and perform mathematical calculations on them in the future, you should choose numeric data types (eg. <strong>Integer<\/strong> or <strong>Decimal<\/strong>) instead. Or if you wanted to use datetime functions you should use date\/time data types (eg. <strong>Date<\/strong>, <strong>Time<\/strong> or <strong>Timestamp).<\/strong><\/p>\n\n\n\n<p>All these will become much clearer through an example.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a new table in SQL using SQL Workbench (or pgadmin4)!<\/h2>\n\n\n\n<p>Let&#8217;s get back to practice!<\/p>\n\n\n\n<p>I assume that you have already gone through the <a href=\"https:\/\/data36.com\/data-coding-101-install-python-sql-r-bash\/\">Install Python, R, SQL and Bash<\/a> article and that you have downloaded and set up either <a href=\"https:\/\/data36.com\/install-sql-workbench-postgresql\/\">SQL Workbench<\/a>&nbsp;or <a href=\"http:\/\/pgadmin.org\/\">pgamdin4<\/a>. Let&#8217;s open either of the two!<\/p>\n\n\n\n<p><em>Note: I&#8217;ll work with SQL Workbench here because that&#8217;s my favorite SQL manager. Feel free to use your favorite: the process will be the exact same for every tool.<\/em><\/p>\n\n\n\n<p>Establish the connection to your data server!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"669\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-sql-establish-connection-1024x669.png\" alt=\"create table sql - establish connection\" class=\"wp-image-1973\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-sql-establish-connection-1024x669.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-sql-establish-connection-300x196.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-sql-establish-connection-768x501.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-sql-establish-connection-973x635.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-sql-establish-connection-508x332.png 508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Now, create a new table using the <code>CREATE TABLE<\/code> syntax we learned above &#8212; replacing the placeholders with real values! I&#8217;ll create a table for storing the imaginary chemistry test results of an imaginary class.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE test_results\n(\n  name         TEXT,\n  student_id   INTEGER,\n  birth_date   DATE,\n  test_result  DECIMAL,\n  grade        TEXT,\n  passed       BOOLEAN\n);\n<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"406\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created-1024x406.png\" alt=\"create table postgreSQL - table created\" class=\"wp-image-1974\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created-1024x406.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created-300x119.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created-768x305.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created-973x386.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created-508x202.png 508w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgreSQL-table-created.png 2046w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>In this table, I created six columns with five different data types (text, date, decimal, boolean and integer). If I query this new table, I&#8217;ll get an empty table. But at least I can see the column headers, so I know that my table has been created! Great success!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Don&#8217;t forget to commit your changes!<\/h2>\n\n\n\n<p><strong>One more important thing before we finish!<\/strong><br>Sometimes, when you create a new table in an SQL query tool (like pgadmin4 or SQL Workbench), you have to <span style=\"text-decoration: underline;\"><em>publish<\/em><\/span> the changes you made in the tool to your data server. In programming this is often referred as &#8220;committing your changes&#8221;.<\/p>\n\n\n\n<p><em>Note: Don&#8217;t worry, &#8220;publishing&#8221; in this case means that you make your changes visible for other users on your server and, of course, it does not mean that it will be available for everyone on the internet. \ud83d\ude42<\/em><\/p>\n\n\n\n<p>I wrote <em>&#8220;sometimes&#8221;<\/em> because in most SQL manager tools, there is an auto-commit function, too. You can check whether yours is on or off!<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"1024\" height=\"367\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4-1024x367.png\" alt=\"create table postgresql - autocommit pgadmin4\" class=\"wp-image-1975\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4-1024x367.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4-300x108.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4-768x276.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4-973x349.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4-508x182.png 508w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-pgadmin4.png 1912w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>In pgadmin, when you are in query mode, you should click the little drop-down button next to your Execute button.<br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"676\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-sql-workbench-1024x676.png\" alt=\"create table postgresql - autocommit sql workbench\" class=\"wp-image-1976\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-sql-workbench-1024x676.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-sql-workbench-300x198.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-sql-workbench-768x507.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-sql-workbench-973x642.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-autocommit-sql-workbench-508x335.png 508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>In SQL Workbench, you can set this before you connect to your data server.<\/p>\n\n\n\n<p>If auto-commit is <strong>ON<\/strong>, you are good, your changes are automatically published to your server. If it&#8217;s <strong>OFF<\/strong>, just type to your tool:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">COMMIT;<\/pre>\n\n\n\n<p>Then run it\u2026 and your changes are committed to the server!<\/p>\n\n\n\n<p>Done! Your table is created and the changes happened on your data server, too!<\/p>\n\n\n\n<p><em>Note: if your changes are not commited, they will be lost after you close your connection in your SQL tool. That means that next time you open it, everything you have created will be gone. I&#8217;ve made this mistake a few times before and believe me, it&#8217;s very unpleasant. So watch out for commiting! \ud83d\ude42<\/em><\/p>\n\n\n\t\t<div data-elementor-type=\"section\" data-elementor-id=\"7012\" class=\"elementor elementor-7012\" data-elementor-post-type=\"elementor_library\">\n\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-259c3993 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"259c3993\" data-element_type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t\t<div class=\"elementor-background-overlay\"><\/div>\n\t\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-679a79f1\" data-id=\"679a79f1\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e5ca0c1 elementor-widget elementor-widget-heading\" data-id=\"e5ca0c1\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">The Junior Data Scientist's First Month<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f5bc28c elementor-widget elementor-widget-text-editor\" data-id=\"f5bc28c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"color: var( --e-global-color-text ); font-family: 'PT Serif'; font-size: 1em; word-spacing: var( --e-global-typography-text-word-spacing );\">A 100% practical online course. A 6-week simulation of being a junior data scientist at a true-to-life startup.<\/span><\/p><p><i>&#8220;Solving real problems, getting real experience &#8211; just like in a real data science job.&#8221;<\/i><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6da23e4 elementor-align-center elementor-widget elementor-widget-button\" data-id=\"6da23e4\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-md\" href=\"https:\/\/data36.com\/the-junior-data-scientists-first-month-online-course\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Learn more...<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t\n\n\n\n<h2 class=\"wp-block-heading\">About the syntax<\/h2>\n\n\n\n<p><strong>Syntax, syntax, syntax!<\/strong> In my <a href=\"https:\/\/data36.com\/sql-for-aspiring-data-scientists-7-day-online-course\/\">SQL course<\/a>, I see that people have a hard time with the syntax of <code>CREATE TABLE<\/code>, so here&#8217;s a one-picture recap about how to do it right:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"547\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-syntax-1024x547.png\" alt=\"create table postgresql syntax\" class=\"wp-image-1977\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-syntax-1024x547.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-syntax-300x160.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-syntax-768x410.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-syntax-973x519.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-syntax-508x271.png 508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\"><li>After the <code>CREATE TABLE new_table_name<\/code>, the column information goes between parentheses.<\/li><li>The different columns have to be separated with commas.<\/li><li>I personally recommend using line breaks between columns, and tabs between the column names and the data types. Remember, indentations and line breaks do not affect the execution of the SQL statement, only make it easier to read.<\/li><li>Don&#8217;t forget the semicolon from the end of the SQL statement!<\/li><\/ol>\n\n\n\n<p>If you want to go through the general SQL syntax best practices, check <a href=\"https:\/\/data36.com\/sql-best-practices-data-analysts\/\">this article<\/a>!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to delete tables in SQL?<\/h2>\n\n\n\n<p>Deleting a table is even simpler than creating one.<\/p>\n\n\n\n<p>It&#8217;s this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DROP TABLE table_name;<\/pre>\n\n\n\n<p>This will remove the whole table with all the data in it. So be very careful with this one\u2026<\/p>\n\n\n\n<p>On our example this would be:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DROP TABLE test_results;<\/pre>\n\n\n\n<p>One more thing! If you drop a table, you have to commit these changes, too. (Either turn on auto-commit or use the <code>COMMIT<\/code> statement after <code>DROP TABLE<\/code>.)<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"205\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-1024x205.png\" alt=\"create table postgresql drop table\" class=\"wp-image-1981\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-1024x205.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-300x60.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-768x154.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-973x195.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-508x102.png 508w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p><em>Note: more about deleting an SQL table here: <a href=\"https:\/\/data36.com\/sql-truncate-table-drop-table-tutorial\/\">SQL TRUNCATE TABLE and DROP TABLE tutorial<\/a>.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Extra parameters<\/h2>\n\n\n\n<p>After the data type of the column, you can add extra parameters, too. These are optional and mostly technical things but here I&#8217;ll highlight the three most important extra parameters:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><code>NOT NULL<\/code>: If you add this, you can&#8217;t add <code>NULL<\/code> values to the given column.<\/li><li><code>UNIQUE<\/code>: If you add this, you can&#8217;t add the same value to the column twice. This is especially important when you store unique user IDs, for instance.<\/li><li><code>PRIMARY KEY<\/code>: Practically speaking, this is a combination of <code>NOT NULL<\/code> and <code>UNIQUE<\/code> but it also has some technical advantages. (Let&#8217;s not get there yet, though.) You can have only one <code>PRIMARY KEY<\/code> column per table.<\/li><\/ol>\n\n\n\n<p>If you haven&#8217;t deleted the previously created <code>test_results<\/code> table yet, do that now:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DROP TABLE test_results;<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"205\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-1024x205.png\" alt=\"create table postgresql drop table\" class=\"wp-image-1981\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-1024x205.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-300x60.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-768x154.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-973x195.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3-508x102.png 508w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-drop-table3.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>This deleted our table.<br>So we can re-create and extend it with a few additional extra parameters:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">CREATE TABLE test_results\n(\n  name         TEXT,\n  student_id   INTEGER   PRIMARY KEY,\n  birth_date   DATE,\n  test_result  DECIMAL   NOT NULL,\n  grade        TEXT      NOT NULL,\n  passed       BOOLEAN   NOT NULL\n);\n<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters-1024x412.png\" alt=\"create table postgresql extra parameters\" class=\"wp-image-1979\" srcset=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters-1024x412.png 1024w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters-300x121.png 300w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters-768x309.png 768w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters-973x391.png 973w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters-508x204.png 508w, https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create-table-postgresql-extra-parameters.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>In this table, the <code>student_id<\/code> is a unique value that can&#8217;t be null (so I defined it as a <code>PRIMARY KEY<\/code>) and the test_result, grade and passed columns have to have values in them (so I defined them as <code>NOT NULL<\/code>).<\/p>\n\n\n\n<p>Again the extra parameters are optional but if you use them when you create a new&nbsp;SQL table, you can spare a lot of headaches for yourself later. (E.g. <code>UNIQUE<\/code> won&#8217;t let you accidentally copy the same dataset into your data table twice.)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>This is how to create tables in SQL. These were the basics that I think you have to know as a data analyst\/scientist. For more advanced applications, check out the original <a href=\"https:\/\/www.postgresql.org\/docs\/9.1\/static\/sql-createtable.html\">PostgreSQL documentation<\/a>.<\/p>\n\n\n\n<p>And now, let&#8217;s continue with the <a href=\"https:\/\/data36.com\/how-to-import-data-into-sql-tables\/\">How to import data into SQL tables article<\/a> where I\u2019ll show you three ways to populate the table we have created with data!<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you want to learn more about how to become a data scientist, take my 50-minute video course: <a href=\"https:\/\/data36.com\/how-to-become-a-data-scientist\/\">How to Become a Data Scientist.<\/a>&nbsp;(It&#8217;s&nbsp;free!)<\/li>\n\n\n\n<li>Also check out my 6-week online course: <a href=\"https:\/\/data36.com\/jds\/\">The Junior Data Scientist\u2019s First Month video course.<\/a><\/li>\n<\/ul>\n\n\n\n<p><em>Cheers,<\/em><br><strong><em>Tomi Mester<\/em><\/strong><\/p>\n\n\n\n<p><em>Cheers,<\/em><br><strong><em>Tomi Mester<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working with SQL for data analysis sometimes requires creating new tables. Do you want to store the output of your SQL queries? Do you need to pull new data sources (eg. csv files) into your analyses? Do you want to store your transformed and cleaned data without deleting your original data sets? First, you have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1418,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[139],"tags":[79,150,13,109,90,92,112,65,108,110,30],"class_list":["post-1971","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-coding-data-science-analytics","tag-analytics","tag-create-table","tag-data","tag-data-analysis","tag-data-coding","tag-learn-to-code","tag-postgresql","tag-sql","tag-sql-for-data-analysis","tag-sql-workbench","tag-tomi-mester"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a Table in SQL (CREATE TABLE) - Data36<\/title>\n<meta name=\"description\" content=\"In this article I&#039;ll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data36.com\/create-table-sql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Table in SQL (CREATE TABLE)\" \/>\n<meta property=\"og:description\" content=\"In this article I&#039;ll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data36.com\/create-table-sql\/\" \/>\n<meta property=\"og:site_name\" content=\"Data36\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/data36\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/data36\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-26T12:44:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-11T21:51:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create_table_sql.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tomi Mester\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Create a Table in SQL (CREATE TABLE)\" \/>\n<meta name=\"twitter:description\" content=\"In this article I&#039;ll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create_table_sql.png\" \/>\n<meta name=\"twitter:creator\" content=\"@data36_com\" \/>\n<meta name=\"twitter:site\" content=\"@data36_com\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomi Mester\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/data36.com\/create-table-sql\/\",\"url\":\"https:\/\/data36.com\/create-table-sql\/\",\"name\":\"How to Create a Table in SQL (CREATE TABLE) - Data36\",\"isPartOf\":{\"@id\":\"https:\/\/data36.com\/#website\"},\"datePublished\":\"2018-03-26T12:44:20+00:00\",\"dateModified\":\"2022-05-11T21:51:15+00:00\",\"author\":{\"@id\":\"https:\/\/data36.com\/#\/schema\/person\/cbc505eee4cecd9d74a2c0f0d00d356e\"},\"description\":\"In this article I'll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.\",\"breadcrumb\":{\"@id\":\"https:\/\/data36.com\/create-table-sql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/data36.com\/create-table-sql\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/data36.com\/create-table-sql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/data36.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Table in SQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/data36.com\/#website\",\"url\":\"https:\/\/data36.com\/\",\"name\":\"Data36\",\"description\":\"Learn Data Science the Hard Way!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/data36.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/data36.com\/#\/schema\/person\/cbc505eee4cecd9d74a2c0f0d00d356e\",\"name\":\"Tomi Mester\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/data36.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8b782b29236065ff5e1c0e47a8bdb6ba?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8b782b29236065ff5e1c0e47a8bdb6ba?s=96&d=mm&r=g\",\"caption\":\"Tomi Mester\"},\"description\":\"Tomi Mester is a data analyst and researcher. He\u2019s the author of the Data36 blog where he gives a sneak peek into online data analysts\u2019 best practices. He writes posts and tutorials on a weekly basis about data science, AB-testing, online research and data coding. Tomi is a guest blogger on Crazyegg, Hackernoon and Tech-In-Asia. You can meet him as a presenter on conferences like: Global E-commerce Summit, TEDx, Business Intelligence Forum, etc...\",\"sameAs\":[\"https:\/\/data36.com\",\"https:\/\/www.facebook.com\/data36\"],\"url\":\"https:\/\/data36.com\/author\/mestitomi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create a Table in SQL (CREATE TABLE) - Data36","description":"In this article I'll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.","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:\/\/data36.com\/create-table-sql\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Table in SQL (CREATE TABLE)","og_description":"In this article I'll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.","og_url":"https:\/\/data36.com\/create-table-sql\/","og_site_name":"Data36","article_publisher":"https:\/\/www.facebook.com\/data36\/","article_author":"https:\/\/www.facebook.com\/data36","article_published_time":"2018-03-26T12:44:20+00:00","article_modified_time":"2022-05-11T21:51:15+00:00","og_image":[{"width":"1200","height":"630","url":"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create_table_sql.png","type":"image\/png"}],"author":"Tomi Mester","twitter_card":"summary_large_image","twitter_title":"How to Create a Table in SQL (CREATE TABLE)","twitter_description":"In this article I'll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.","twitter_image":"https:\/\/data36.com\/wp-content\/uploads\/2018\/03\/create_table_sql.png","twitter_creator":"@data36_com","twitter_site":"@data36_com","twitter_misc":{"Written by":"Tomi Mester","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/data36.com\/create-table-sql\/","url":"https:\/\/data36.com\/create-table-sql\/","name":"How to Create a Table in SQL (CREATE TABLE) - Data36","isPartOf":{"@id":"https:\/\/data36.com\/#website"},"datePublished":"2018-03-26T12:44:20+00:00","dateModified":"2022-05-11T21:51:15+00:00","author":{"@id":"https:\/\/data36.com\/#\/schema\/person\/cbc505eee4cecd9d74a2c0f0d00d356e"},"description":"In this article I'll show you the CREATE TABLE SQL statement, the syntax, and the different column parameters that you have to set.","breadcrumb":{"@id":"https:\/\/data36.com\/create-table-sql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data36.com\/create-table-sql\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/data36.com\/create-table-sql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/data36.com\/"},{"@type":"ListItem","position":2,"name":"How to Create a Table in SQL"}]},{"@type":"WebSite","@id":"https:\/\/data36.com\/#website","url":"https:\/\/data36.com\/","name":"Data36","description":"Learn Data Science the Hard Way!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data36.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/data36.com\/#\/schema\/person\/cbc505eee4cecd9d74a2c0f0d00d356e","name":"Tomi Mester","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data36.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8b782b29236065ff5e1c0e47a8bdb6ba?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8b782b29236065ff5e1c0e47a8bdb6ba?s=96&d=mm&r=g","caption":"Tomi Mester"},"description":"Tomi Mester is a data analyst and researcher. He\u2019s the author of the Data36 blog where he gives a sneak peek into online data analysts\u2019 best practices. He writes posts and tutorials on a weekly basis about data science, AB-testing, online research and data coding. Tomi is a guest blogger on Crazyegg, Hackernoon and Tech-In-Asia. You can meet him as a presenter on conferences like: Global E-commerce Summit, TEDx, Business Intelligence Forum, etc...","sameAs":["https:\/\/data36.com","https:\/\/www.facebook.com\/data36"],"url":"https:\/\/data36.com\/author\/mestitomi\/"}]}},"_links":{"self":[{"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/posts\/1971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/comments?post=1971"}],"version-history":[{"count":0,"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/posts\/1971\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/media\/1418"}],"wp:attachment":[{"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/media?parent=1971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/categories?post=1971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data36.com\/wp-json\/wp\/v2\/tags?post=1971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}