MySQL – Create Table

| Last Updated: | In: MySQL Tutorial


In this tutorial, you will learn how to create a table in MySQL database. You can create a table by using the command line, PHPMyAdmin, or any other MySQL GUI tools. I am using MySQL Workbench GUI Tool and PHPMyAdmin to perform the database operations.

There are three things which required to create a new table in MySQL database. See the below:

  1. Table Name
  2. Table fields name
  3. definition of each field

MySQL – Create Table

In the below example, we are creating “tbl_employee” in the database “mysql_tutorial”.

How to see the created table using MySQL Workbench

Open your MySQL Workbench application, connect with MySQL, select your database and then copy paste above MySQL queries and execute. It will create a “tbl_employee” table in your selected database.

How to see the created table using PHPMyAdmin

Open the PHPMyAdmin, select database, click on SQL tabs and then copy paste above MySQL queries and execute it. It will create MySQL table as tbl_employee.

Now click on tbl_employee table just created and see the table defination.