CREATE TABLE

SQL CREATE TABLE Keyword

The CREATE TABLE command is used to create a new table in the database. You define the table name and specify each column’s name and data type.

Tutorials dojo strip

SQL CREATE TABLE Syntax

SQL

SQL CREATE TABLE Example

This creates a new table named Mechanics with five columns.

SQL

SQL CREATE TABLE Using Another Table Syntax

You can also create a new table by copying selected columns and data from an existing table.

SQL

SQL CREATE TABLE Using Another Table Example

This creates a new table named PatientNames with only the first_name and last_name columns from the Patients table.

SQL

SQL CREATE TABLE Labs

Tutorials dojo strip