O'Reilly logo

Microsoft SQL Server 2012 T-SQL by Debra Aaron, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13 – Table Create and Data Types

“Create a definite plan for carrying out your desire and begin at once, whether you are ready or not, to put this plan into action.“

- Napoleon Hill

Creating a Table that is a Heap

CREATE TABLE Emp_Intl

(

 Employee_No            INTEGER

 ,Dept_No                    SMALLINT

 ,First_Name                VARCHAR(12)

 ,Last_Name                CHAR(20)

 ,Salary                        DECIMAL(8,2)

);

image

A basic TABLE CREATE STATEMENT. You have Columns and the data types in them. This table is called a Heap because it does not have a clustered index. A Heap is stored as an unordered heap of rows.

Heap Page

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required