Can I reset cursor's position to the beginning?

前端 未结 4 1997
感动是毒
感动是毒 2020-12-29 22:27

As in the topic. Can I simply reset cursor\'s position to the beginning in Transact-SQL, so it can run again over the table? I want to reset it in the following context:

4条回答
  •  太阳男子
    2020-12-29 23:23

    The data retrieved by the cursor will not change.

    STATIC

    Defines a cursor that makes a temporary copy of the data to be used by the cursor. All requests to the cursor are answered from this temporary table in tempdb; therefore, modifications made to base tables are not reflected in the data returned by fetches made to this cursor, and this cursor does not allow modifications.

提交回复
热议问题