Example: Creating a Simple Index
proc sql;
create unique index EmpID
on work.payrollmaster(empid);
Example: Creating a Composite, Unique Index
proc sql;
create unique index daily
on work.marchflights(flightnumber,date);
코드 설명:
daily라는 composite index
proc sql;
describe table marchflights;
options msglevel=i;
proc sql;
select *
from marchflights
where flightnumber='182';
quit;
Example: Dropping a Composite Index
proc sql;
drop index daily
from work.marchflights;
Directing SAS to Ignore All Indexes
proc sql;
select *
from marchflights (idxwhere=no)
where flightnumber='182';
quit;
Directing SAS to Use a Specified Index
proc sql;
select *
from marchflights (idxname=daily)
where flightnumber='182';
quit;