cursor_name定義的 Transact-SQL 伺服器數據指標名稱。 cursor_name 必須符合識別碼的規則。INSENSITIVE定義一個資料指標,它會建立資料暫存複本供資料指標本身使用。 對數據指標的所有要求都會從 中的 tempdb這個臨時表回答。 因此,對基表所做的修改不會反映在對這個數據指標
SQL Server Azure SQL 数据库 Azure SQL 托管实例 Microsoft Fabric SQL 数据库 定义了 Transact-SQL 服务器游标的属性,例如游标的滚动行为和用于生成游标所操作的结果集的查询。DECLARE CURSOR既接受基于 ISO 标准的语法,也接受使用一组 Transact-SQL 扩展的语法。
SQL Server Azure SQL 数据库 Azure SQL 托管实例 Microsoft Fabric SQL 数据库 定义了 Transact-SQL 服务器游标的属性,例如游标的滚动行为和用于生成游标所操作的结果集的查询。DECLARE CURSOR既接受基于 ISO 标准的语法,也接受使用一组 Transact-SQL 扩展的语法。
For example, suppose a static cursor fetches a row, and another application then updates that row. If the application refetches the row from the static cursor, the values it sees are unchanged, despite the changes made by the other application. All types of scrolling are supported....
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.
Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance SQL database in Microsoft Fabric 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 accepts both a ...
SQL Server Azure SQL 数据库 Azure SQL 托管实例 Microsoft Fabric SQL 数据库 定义了 Transact-SQL 服务器游标的属性,例如游标的滚动行为和用于生成游标所操作的结果集的查询。DECLARE CURSOR既接受基于 ISO 标准的语法,也接受使用一组 Transact-SQL 扩展的语法。
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 服务器游标的特性,例如游标的滚动行为和用于生成游标对其进行操作的结果集的查询。OPEN 语句填充结果集,FETCH 从结果集返回行。CLOSE 语句释放与游标关联的当前结果集。DEALLOCATE 语句释放游标所使用的资源。 DECLARE CURSOR 语句的第一种格式使用 SQL-92 语法声明游标行为。DECLARE CUR...
SQL 92 Syntax DECLARE cursor_name [ INSENSITIVE ] [ SCROLL ] CURSOR FOR select_statement [ FOR { READ ONLY | UPDATE [ OF column_name [ ,...n ] ] } ][;]Transact-SQL Extended Syntax DECLARE cursor_name CURSOR [ LOCAL | GLOBAL ][ FORWARD_ONLY | SCROLL ][ STATIC | ...