Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

The CREATE TABLE Statement

A Brief Overview

PROC SQL offers you three ways to create a table. The CREATE TABLE statement is used for all three methods, although the statement syntax varies for each method.
Method of Creating a Table
Example
create an empty table by defining columns
proc sql;
   create table work.discount
      (Destination char(3),
       BeginDate num Format=date9.,
       EndDate num format=date9.,
       Discount num);
quit;
create an empty table that is like (has the same columns and attributes as) an existing table
proc sql;
   create table work.flightdelays2
      like certadv.flightdelays;
quit;
create a populated table (a table with both columns and rows of data) from a query result
proc sql;
   create table work.ticketagents ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692