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 语法:...
適用於:Microsoft Fabric 中的 SQL ServerAzure SQL 資料庫 Azure SQL 受控執行個體 SQL 資料庫 定義Transact-SQL 伺服器資料指標的屬性,例如立資料指標運作時的捲動行為以及用以建立結果集的查詢。 DECLARE CURSOR 可接受採用 ISO 標準以及使用 Transact-SQL 延伸模組的語法。 Transact-SQL 語法慣例 Synta...
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.
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.
Gilt für: SQL Server Azure SQL-Datenbank Azure SQL Managed Instance SQL-Datenbank in Microsoft Fabric Definiert die Attribute eines Transact-SQL-Servercursors, wie z. B. dessen Scrollverhalten sowie die Abfrage, die zum Erstellen des Resultsets verwendet wird, in dem der Cursor ausgeführt wird...
Gilt für: SQL Server Azure SQL-Datenbank Azure SQL Managed Instance SQL-Datenbank in Microsoft Fabric Definiert die Attribute eines Transact-SQL-Servercursors, wie z. B. dessen Scrollverhalten sowie die Abfrage, die zum Erstellen des Resultsets verwendet wird, in dem der Cursor ausgeführt wird...
代码如下: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 ...
Changes to nonkey values in the base tables, either made by the cursor owner or committed by other users, are visible as the owner scrolls around the cursor. Inserts made by other users are not visible (inserts cannot be made through a Transact-SQL server cursor). If a row is deleted,...