Using a cursor command, delete removes a row from a table. The row affected must have been made current by a read cursor.
1. delete [[database.]owner.]{table_name | view_name}
2. delete [from] [[database.]owner.]{table_name|view_name} where current of cursor_name
Any valid object in the catalog can be substituted for table_name or view_name.
is an optional keyword used for compatibility with other versions of SQL. Follow it with the name of the table or view from which you want to remove rows.
is a standard where clause.
declare c1 cursor for select * from tablea for update of col1
delete tablea where current of c1
The cursor can be reused multiple times before it is deallocated.
Copyright © 2005. Sybase Inc. All rights reserved. |