Loading, please wait...

Tables

How To Create A Table in SQL

 

Introduction:
In this article, you will learn what is Table and how to create a table in SQL.


We need to create a table to store the information in our database. Thus, for creating a table in the database, we use this statement. In SQL, all work is completed with the help of tables. Create is a keyword and we can easily see the whole work of the table in the database. Each table should have a different name and an identifier. If you want to create a copy of any table, we use to create and select statement.

 

Tables are divided into two parts: Rows and Columns.

 

Syntax:

The basic syntax of creating the query is as follows:

CREATE TABLE table_name(column1 datatype, column2 datatype, column3 datatype....);

 

Example

Step 1: We create a database in SQL and then write the query to create a new table.

 

 

 

Step 2: Select and execute the query.

 

 

 

Step 3: Now, you can see your table in your database and use this to store the information.

 

 

 

Summary:
Thus, we learned, how to create a table in SQL.