Managing Indexes with PROC SQL

Overview

You can also create or delete indexes from an existing data set within a PROC SQL step. The CREATE INDEX statement enables you to create an index on a data set. The DROP INDEX statement enables you to delete an index from a data set.
General form, PROC SQL to create and delete an index:
PROC SQL;
CREATE <UNIQUE > INDEX index-name
ON table-name(column-name-1<...,column-name-n>);
DROP INDEX index-name FROM table-name;
QUIT;
Here is an explanation of the syntax:
index-name
is the same as column-name-1 if the index is based on the values of one column only.
index-name
is not the same as any column-name if the index is based on multiple columns.
table-name
is the name of the data set ...

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.