SQL Server Performance

Is sql server cursor by default read only?

Discussion in 'General Developer Questions' started by chickisonline, Jan 17, 2007.

  1. chickisonline New Member

    Hi,

    I've got the following sql statement:

    DECLARE cheque_cursor CURSOR FOR
    SELECT
    c.trans_init_reg_s,
    c.cheqno_s,
    c.bra_gche_s
    FROM
    cheque c
    JOIN
    cheqbook b
    ON
    c.trans_init_reg_s = b.transnchb_s
    WHEREc.code_s = @code_s
    OPEN cheque_cursor
    If I run it SQL Server is locking the records returned by the select statement in those 2 tables(cheque and cheqbook). As you can see the select statement is updatable. The question is:Is sql server cursor by default updatable or read only?
  2. illiyaz.net New Member

    hi,

    i think by default cursors are updatable.

    Best Regards,
    Mohammad Illiyaz
  3. chickisonline New Member

    quote:Originally posted by illiyaz.net

    hi,

    i think by default cursors are updatable.

    Best Regards,
    Mohammad Illiyaz

    That's my opinion too.

    Thank a lot Illiyaz

    Regards,

    Dan Puiu
  4. satya Moderator

Share This Page