DECLARE CURSOR如果使用 Transact-SQL 語法未指定READ_ONLY、OPTIMISTIC或SCROLL_LOCKS, 則預設值如下: SELECT如果語句不支援更新(許可權不足、存取不支援更新的遠端資料表等等),則資料指標為READ_ONLY。 STATIC和FAST_FORWARD資料指標預設為READ_ONLY。 DYNAMIC和KEYSET資料
DECLARE CURSOR 的第二种格式使用 Transact-SQL 扩展,使您得以使用在 ODBC、ADO 和 DB-Library的数据库 API 游标函数中的相同游标类型定义游标。 不能混淆这两种格式。如果在 CURSOR 关键字的前面指定 SCROLL 或 INSENSITIVE 关键字,则不能在 CURSOR 和 FOR select_statement 关键字之间使用任何关键字。如果在 CURS...
如果使用 Transact-SQL 语法的 DECLARE CURSOR 未指定 READ_ONLY、OPTIMISTIC 或SCROLL_LOCKS,则默认值如下所示: 如果SELECT 语句不支持更新(由于权限不够、访问的远程表不支持更新等等),则游标为 READ_ONLY。 STATIC 和FAST_FORWARD 游标默认为 READ_ONLY。 DYNAMIC 和KEYSET 游标默认为 OPTIMISTIC。 游标名称只能被...
MS SQL SERVER 支持三种类型的游标:Transact_SQL 游标,API服务器游标和客户游标。 (1)Transact_SQL 游标 Transact_SQL 游标是由DECLARE CURSOR 语法定义、主要用在Transact_SQL脚本、存储过程和触发器中。Transact_SQL 游标主要用在服务器上,由从客户端发送给服务器的Transact_SQL 语句或是批处理、存储过程、触发器...
DECLARE CURSOR如果使用 Transact-SQL 语法未指定READ_ONLY,OPTIMISTIC或者SCROLL_LOCKS默认值如下所示: SELECT如果语句不支持更新(权限不足、访问不支持更新的远程表等),则游标为READ_ONLY。 STATIC和FAST_FORWARD游标默认为READ_ONLY。 DYNAMIC和KEYSET游标默认为OPTIMISTIC。
DECLARE CURSOR defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates. The OPEN statement populates the result set, and FETCH returns a row from the result set. The CLOSE statement release...
DECLARE CURSOR defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates. The OPEN statement populates the result set, and FETCH returns a row from the result set. The CLOSE statement ...
DECLARE CURSOR defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates. The OPEN statement populates the result set, and FETCH returns a row from the result set. The CLOSE statement ...
[;] Transact-SQL Extended Syntax DECLARE cursor_name CURSOR [ LOCAL | GLOBAL ] [ FORWARD_ONLY | SCROLL ] [ STATIC | KEYSET | DYNAMIC | FAST_FORWARD ] [ READ_ONLY | SCROLL_LOCKS | OPTIMISTIC ] [ TYPE_WARNING ] FOR select_statement [ FOR UPDATE [ OF column_name [ ,...n ] ] ]...
Defines the attributes of a Transact-SQL server cursor, such as its scrolling behavior and the query used to build the result set on which the cursor operates.DECLARE CURSORaccepts both a syntax based on the ISO standard and a syntax using a set of Transact-SQL extensions. ...