SQL CREATE TABLE

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

Syntax:
CREATE TABLE table_name
(
column_name1 datatype(size) [ NULL | NOT NULL ],
column_name2 datatype(size) [ NULL | NOT NULL ],
column_name3 datatype(size) [ NULL | NOT NULL ],
....
);

SQL CREATE TABLE

The following SQL statement creates a new table in the database named as "tbl_employee":

SQL Example:

CREATE TABLE tbl_employee
(
employee_id INT NOT NULL,
last_name VARCHAR(100) NOT NULL,
first_name VARCHAR(100) NOT NULL,
address VARCHAR(255) NULL
);

Scroll Back to Top