Previous Page | Next Page

The SQL Procedure

UPDATE Statement


Modifies a column's values in existing rows of a table or view.
Restriction: You cannot use UPDATE on a table that is accessed by an engine that does not support UPDATE processing.
Featured in: Updating Data in a PROC SQL Table

UPDATE table-name|sas/access-view|proc-sql-view <AS alias>
SET column=sql-expression
<, ... column=sql-expression>
<SET column=sql-expression
<, ... column=sql-expression>>
<WHERE sql-expression>;


Arguments

alias

assigns an alias to table-name, sas/access-view, or proc-sql-view.

column

specifies a column in table-name, sas/access-view, or proc-sql-view.

sas/access-view

specifies a SAS/ACCESS view.

sql-expression

See sql-expression.

Restriction: You cannot use a logical operator (AND, OR, or NOT) in an expression in a SET clause.
table-name

specifies a PROC SQL table. 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.

proc-sql-view

specifies a PROC SQL view. 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.


Updating Tables through Views

You can update one or more rows of a table through a view, with some restrictions. See Updating PROC SQL and SAS/ACCESS Views in the SAS 9.2 SQL Procedure User's Guide.


Details

Previous Page | Next Page | Top of Page