UPDATE statement

Function

Use this statement to modify data in the database.

Syntax 1

UPDATE table-list

 

SET column-name = expression, . . .

 

[ VERIFY ( column-name, . . . ) VALUES ( expression, . . . ) ]

 

[ WHERE search-condition ]

 

[ ORDER BY expression [ ASC DESC ], . . . ]

Syntax 2

UPDATE table

 

PUBLICATION publication

 

{ SUBSCRIBE BY expression

 

OLD SUBSCRIBE BY expression

 

NEW SUBSCRIBE BY expression }

 

WHERE search-condition

 

expression: value subquery

Usage

Syntax 1 and Syntax 2 are applicable only to SQL Remote.

 

Syntax 2 with no OLD and NEW SUBSCRIBE BY expressions must be

 

used in a BEFORE trigger.

 

Syntax 2 with OLD and NEW SUBSCRIBE BY expressions can be used

 

anywhere.

Permissions

Must have UPDATE permission for the columns being modified.

Side effects

None.

See also

“UPDATE statement [SQL Remote]” [ASA SQL Reference, page 657]

 

“CREATE TRIGGER statement” on page 359

378

Page 396
Image 396
Sybase DC38133-01-0902-01 manual Update statement SQL Remote ASA SQL Reference, Create Trigger statement on