Optimizing Your SQL Usage |
When you use the SAS/ACCESS LIBNAME statement with the DIRECT_EXE option set to DELETE, the SAS SQL DELETE statement gets passed to the DBMS for execution as long as it contains no WHERE clause. The DBMS deletes all rows but does not delete the table itself.
This example shows how a DELETE statement is passed to Oracle to empty the EMP table.
libname myoralib oracle user=testuser password=testpass direct_exe=delete; proc sql; delete from myoralib.emp; quit;
Oracle then executes this code:
delete from emp
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.