T-SQL Tutorials - TSQLTutorials.com | ||
CREATE TABLE | ||
|
|
Introduction
The CREATE TABLE statement is how new tables are created in SQL. Tables are the structures that hold data, in a relational database. The syntax for using the CREATE TABLE command is as follows:
Beginning Example
In this example we will create a simple 'Employees' table with a 'Name' column, 'Position' column and a 'Salary' column:
CREATE TABLE Employees Second Example
In this next example we will create the same 'Employees' table, but this time we will create an auto-incrementing primary key.
CREATE TABLE Employees |
|