The SQL Procedure |
Restriction: | You cannot use DELETE FROM on a table that is accessed by an engine that does not support UPDATE processing. |
Featured in: | Combining Two Tables |
DELETE
|
Arguments |
assigns an alias to table-name, sas/access-view, or proc-sql-view.
specifies a SAS/ACCESS view that you are deleting rows from.
specifies a PROC SQL view that you are deleting rows from. proc-sql-view can be a one-level name, a two-level libref.view name, or a physical pathname that is enclosed in single quotation marks.
See sql-expression.
specifies the table that you are deleting rows from. table-name can be a one-level name, a two-level libref.table name, or a physical pathname that is enclosed in single quotation marks.
While it is possible to recursively reference the target table of a DELETE statement, doing so can cause data integrity problems and incorrect results. Constructions such as the following should be avoided:
proc sql; delete from a where var1 > (select min(var2) from a);
Deleting Rows through Views |
You can delete one or more rows from a view's underlying table, with some restrictions. See Updating PROC SQL and SAS/ACCESS Views in the SAS 9.2 SQL Procedure User's Guide.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.