You must declare a cursor before you can use it. The declaration specifies the query that defines the cursor result set. You can explicitly define a cursor as insensitive or semi_sensitive, by using either keyword. If you do not specify either, the default value is semi_sensitive.
You can explicitly define a cursor as scrollable or non-scrollable by using scroll or no scroll in the cursor declaration. If you do not specify either, the cursor is non-scrollable.
You can explicitly define a cursor as updatable or read-only by using the options for update or for read only. If you omit either one, Adaptive Server determines whether the cursor is updatable based on the type of query that defines the cursor result set. However, Sybase suggests that you explicitly specify one or the other; in the case of updates, this ensures that Adaptive Server performs the positioned updates correctly.
You cannot use update or delete statements on the result set of a read-only cursor; all scrollable cursors and insensitive cursors are read-only.
Copyright © 2005. Sybase Inc. All rights reserved. |