適用於:SQL Server
Azure SQL Database
Azure SQL 受控執行個體
Microsoft Fabric 中的 SQL 資料庫
參考資料指標的變數或預存程序 OUTPUT 參數的資料類型。
Remarks
以下是可參考 cursor 資料類型之變數和參數的作業:
- DECLARE @local_variable 和 SET@local_variable 陳述。
- OPEN、FETCH、CLOSE 和 DEALLOCATE 資料指標陳述式。
- 預存程序輸出參數。
- CURSOR_STATUS 函數。
- sp_cursor_list、sp_describe_cursor、sp_describe_cursor_tables,及 sp_describe_cursor_columns 系統預存程序。
sp_cursor_list 和 sp_describe_cursor 的 cursor_name 輸出資料行會傳回 cursor 變數的名稱。
任何使用 cursor 資料類型建立的變數都可為 Null。
游標資料型別不能用於語句中的CREATE TABLE欄位。