Deleting Rows in a Table
Overview
To delete some or all of the rows
in a table, use the DELETE statement. When the statement is successfully
executed, the SAS log shows a message that indicates the number of
rows that have been deleted.
General form, DELETE
statement for deleting rows in a table:
DELETE FROM table-name
<WHERE expression>;
table-name
specifies the name
of the table in which rows will be deleted.
WHERE
is used to specify
an expression that subsets
the rows to be deleted.
|
CAUTION:
If you want to delete
only a subset of rows in the table, you must specify a WHERE clause
or all rows in the table will be deleted.
Note: You can also use the DELETE statement to delete ...
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.