TechnoLearnAcademy

TECHNOLEARN

SQL CREATE TABLE Statement

The CREATE TABLE Statement is used to create a new table in a SQL database.

Syntax:      

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

Example:

   Objective: In this example, we will create a new table called Emp. 
                      CREATE TABLE Tbl_Emp(Ecode Int,                                                                                                                                                                                                FirstName varchar(20),                                                                                                                                                                              LastName varchar(20),                                                                                                                                                                                       Salary int,                                                                                                                                                                                                      DOJ Date)
Scroll to Top