DECLARE CURSOR 语句的第一种格式使用 SQL-92 语法声明游标行为。DECLARE CURSOR 的第二种格式使用 Transact-SQL 扩展,使您得以使用在 ODBC、ADO 和 DB-Library的数据库 API 游标函数中的相同游标类型定义游标。 不能混淆这两种格式。如果在 CURSOR 关键字的前面指定 SCROLL 或 INSENSITIVE 关键字,则不能在 CURSOR...
cursor_name定義的 Transact-SQL 伺服器數據指標名稱。 cursor_name 必須符合識別碼的規則。INSENSITIVE定義一個資料指標,它會建立資料暫存複本供資料指標本身使用。 對數據指標的所有要求都會從 中的 tempdb這個臨時表回答。 因此,對基表所做的修改不會反映在對這個數據指標所擷取所傳回的數據中,而且此數據指標不允許...
DECLARE CURSOR 语句的第一种格式使用 SQL-92 语法声明游标行为。DECLARE CURSOR 的第二种格式使用 Transact-SQL 扩展,使您得以使用在 ODBC、ADO 和 DB-Library的数据库 API 游标函数中的相同游标类型定义游标。 不能混淆这两种格式。如果在 CURSOR 关键字的前面指定 SCROLL 或 INSENSITIVE 关键字,则不能在 CURSOR...
适用于:SQL Server Azure SQL 数据库 Azure SQL 托管实例 Microsoft Fabric SQL 数据库 定义了 Transact-SQL 服务器游标的属性,例如游标的滚动行为和用于生成游标所操作的结果集的查询。 DECLARE CURSOR 既接受基于 ISO 标准的语法,也接受使用一组 Transact-SQL 扩展的语法。 Transact-SQL 语法约定 语法 ISO 语法:...
cursor_name 定义的 Transact-SQL Server 游标的名称。 cursor_name 必须符合有关标识符的规则。 LOCAL 指定该游标的范围对在其中创建它的批处理、存储过程或触发器是局部的。 该游标名称仅在这个作用域内有效。 在批处理、存储过程、触发器或存储过程OUTPUT参数中,该游标可由局部游标变量引用。OUTPUT参数用于将局部...
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 CURSOR (Transact-SQL) Parti di questo argomento potrebbero essere state tradotte automaticamente o con l’intelligenza artificiale. Versione SQL Server 2022 Ricerca Continuità aziendale Progettazione di database Sviluppo Sistemi interni & architettura...
代码如下:begindeclare @class_noidA char(4), @class_noidB char(4),@spnoidA char(8),@spnoidB char(8)declare class_cursorA cursor local forward_onlyfor select class_no,spno from deleteddeclare class_cursorB cursor local forward_onlyfor select class_no,spno from insertedopen ...
cursor_name 是所定义的 Transact-SQL 服务器游标的名称。cursor_name 必须符合标识符规则。 LOCAL 指定该游标的范围对在其中创建它的批处理、存储过程或触发器是局部的。 该游标名称仅在这个作用域内有效。 在批处理、存储过程、触发器或存储过程 OUTPUT 参数中,该游标可由局部游标变量引用。 OUTPUT 参数用于将局部...
SQL Server implicitly converts the cursor to another type if clauses in select_statement conflict with the functionality of the requested cursor type. For more information, seeUsing Implicit Cursor Conversions. READ ONLY Prevents updates made through this cursor. The cursor cannot be referenced in ...