How to Create Database Tables with SQL Updated on October 26, 2021 by Christopher Maiorana 1 Minutes, 29 Seconds to Read We have already learned what SQL is and how we can use basic select statements to get information out of our database. We can use that information we’ve selected to draw insights from potentially complicated databases. In this article, we’re going to learn how to create database tables with SQL. Remember that tables are basically database items that contain organized columns of data. In the article about select statements, we were working with a table called “respondents”. This table contained a vast list of people who had repsonded to an email campaign indicating that they would like to receive new emails. The columns of this table included a unique identification number for each respondent as well as their name, email, and IP address. In the following example we’re going to show you the code used to create the respondents table: CREATE TABLE respondents ( id INT, first_name VARCHAR(50), last_name VARCHAR(50), email VARCHAR(50), ip_address VARCHAR(20) ); Notice, in the code block above, the first line starts the “CREATE TABLE” statement followed by open parenthesis. Each new line (followed by a comma) introduces the name of a new column in the table and what kind of “datatype” it will hold. For example, numbers can be held within an INT (integer) datatype. For the most detailed and expansive information about acceptable SQL datatypes you should check out the documentation provided by Oracle or various books about database administration. You now have a better understanding of the syntax and usage of the “create table” statement in SQL. And, you have an example of how this statmement is used in the wild. Be sure to leave a comment if you have any questions. If you’re looking for an all-in-one database solution, consider getting your own managed dedicated hosting for limitless resources and customization. Share this Article CM Christopher Maiorana Content Writer II Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog. More Articles by Christopher Related Articles What Is SSL and Why Does It Matter for Your Website? How to Tell If a Website Is Secure: 2026 Browser Guide How to Enable cPanel AutoSSL via Account Management Panel (AMP) and WHM How to Manage AutoSSL Certificates in cPanel How to Run and Read a Traceroute: Troubleshooting Website Connectivity What Are Meta Tags? Guide to SEO Meta Tags & Best Practices Meta Descriptions and SEO Install Let’s Encrypt Free SSL Certificate on Ubuntu with Certbot How to Set Up a 301 Permanent Redirect via .htaccess & cPanel BlaB! AX Maintenance Mode