Why an cursor opened for a select with ORDER by does not reflect updates to the subsequent table

后端 未结 3 1015
[愿得一人]
[愿得一人] 2020-12-21 12:02

I have set this little example of a strange behavior

    SET NOCOUNT ON;
    create table #tmp
    (id int identity (1,1),
    value int);

    insert into          


        
3条回答
  •  遥遥无期
    2020-12-21 12:56

    You can use the sp_describe_cursor stored procedure to view the metadata of the cursor. Doing so on your example shows the following:

    ORDER BY included:

    model = Insensitive (or static), concurrency = Read-Only

    ORDER BY excluded:

    model = Dynamic, concurrency = Optimistic

    Source: http://technet.microsoft.com/en-us/library/ms173806(v=sql.105).aspx

提交回复
热议问题