Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    N Delhi

    Question Unanswered: How to select when when another transaction has not commited on same table?

    Dear all,

    I have a table say MyTab. I insert some rows in this table within a transaction. The transaction has not completed yet, meanwhile I start another transaction from other connection. I try to select some rows from the table MyTab in the second transaction...
    Oooops !!! Its not working.

    When I commit the first transaction, only then I can select rows from table within other transaction.

    My problem is that can I select some rows from a table with connection1 when the transaction has not commited for connection2 on the same table.

    One more thing to note is that I am able to insert rows from both transaction independent of commit tran take place or not.

    If some one replies soon, it will be of great help for me.

    Thanks in advance.


  2. #2
    Join Date
    Feb 2002
    Houston, TX
    Check out "table hints" in Books Online.

    select * from MyTab WITH(NOLOCK)
    Paul Young
    (Knowledge is power! Get some!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts