Creating an Empty Table By Defining Columns

Overview

Sometimes you want to create a new table that is unlike any existing table. In this case, you need to define all of the table’s columns and attributes. To accomplish this, use the CREATE TABLE statement that includes column specifications for the columns that you want to include. This statement creates a table without rows (an empty table).
Note: In addition, integrity constraints can be specified in the CREATE TABLE statement. Integrity constraints are discussed later in this chapter.
General form, basic CREATE TABLE statement with column specifications:
CREATE TABLE table-name
(column-specification-1<,
...column-specification-n>);
Here is an explanation of the syntax:
table-name ...

Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.