where current of?

  • When i was reviewing the stored procs..I saw a weird syntax in where clause inside a cursor..

    update xyz

    set xyz.abc = 0,

    xyz.pqr = 0

    where current of CurName

    what is this where clause doing here???

    TIA

    -----------------------------------------------------------------------
    For better assistance in answering your questions[/url]
    Perforamance Issues[/url]
    Cross Tabs and Pivots[/url]
    Cross Apply[/url]
    The Numbers or Tally Table- Jeff Moden[/url]

  • per BOL

    http://msdn.microsoft.com/en-us/library/ms177523(v=SQL.90).aspx

    WHERE

    Specifies the conditions that limit the rows that are updated. There are two forms of update based on which form of the WHERE clause is used:

    Searched updates specify a search condition to qualify the rows to delete.

    Positioned updates use the CURRENT OF clause to specify a cursor. The update operation occurs at the current position of the cursor.

    -- Cory

  • Thanks Cory.

    -----------------------------------------------------------------------
    For better assistance in answering your questions[/url]
    Perforamance Issues[/url]
    Cross Tabs and Pivots[/url]
    Cross Apply[/url]
    The Numbers or Tally Table- Jeff Moden[/url]

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply