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?
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
It depends on the DECLARE CURSOR usage when it is defined. refer tohttp://www.teratrax.com/articles/sql_server_cursor.html Satya SKJ Microsoft SQL Server MVP Contributing Editor & Forums Moderator http://www.SQL-Server-Performance.Com This posting is provided AS IS with no rights for the sake of knowledge sharing.