CREATE TABLE table_name ( column_1 datatype_1, column_2 datatype_2, column_3 datatype_3 );
A new database or table can be created with this command; the previous example adds a new table with a title and column names.
CREATE TABLE table_name(
column1 datatype
column2 datatype,
column3 datatype,
…..
columnN datatype,
PRIMARY KEY( columnName )
);
Let’s utilise this syntax to make a table that contains information on employees for a business.
use mySchema;
CREATE TABLE employee(
empID int not null,
empName varchar(25) not null,
emailID varchar(25) not null,
PRIMARY KEY (empID)
);