03 Deleting Tables, Indexes, and Views

Use the DROP statement to delete an entire table, SQL view, or index.

Create a table

In [ ]:
data work1;
    do i=1 to 1000;
    x=rand("normal",120,10);
    output;
    end;
run;    

Make sure it is in the work library

In [ ]:
proc sql;
   select count(*) from 
   dictionary.tables 
   where libname="WORK"
       and memname="WORK1"
   ;
run;

Get rid of it

In [ ]:
proc sql;
    drop table work1
    ;
quit;

Check to make sure it is gone

In [ ]:
proc sql;
   select count(*) from 
   dictionary.tables 
   where libname='WORK'
   and memname='WORK1'
   ;
run;