How to implement Transactions (COMMIT / ROLLBACK) using SQL SERVER.

Поділитися
Вставка
  • Опубліковано 21 січ 2025

КОМЕНТАРІ • 22

  • @stmav01
    @stmav01 2 роки тому +2

    Made a huge error at work today and was practically in tears, took lots of people and many hours to resolve, boss sent this vid to me. Thank you for the simple explanation, NEVER AGAIN!!!

    • @SoftwareNuggets
      @SoftwareNuggets  2 роки тому

      Hey @stmav01, thanks for leaving a message and glad to hear is video was helpful. What was the problem you encountered?

  • @rodf1021
    @rodf1021 9 місяців тому +1

    Thank you for the quick and direct video. Good examples and demonstration.

    • @SoftwareNuggets
      @SoftwareNuggets  9 місяців тому

      Hey @rodf1021, I want to thank you for taking the time to leave a comment. Your input is greatly appreciated.

  • @mihut.dragomir
    @mihut.dragomir 2 роки тому +2

    Great video, simple and easy to understand

  • @afzaalawan
    @afzaalawan 2 роки тому +2

    Excellent

    • @SoftwareNuggets
      @SoftwareNuggets  2 роки тому

      Thanks @afzaalawan for leaving a comment. I hope this video was useful!

  • @FirstNameLastName-fv4eu
    @FirstNameLastName-fv4eu 2 роки тому +2

    God bless you man

  • @iceseal-ph2742
    @iceseal-ph2742 3 роки тому +2

    Thanks a lot sir , well explained.

  • @yuchengtsai9888
    @yuchengtsai9888 2 роки тому

    Nice explanation! Thank you man!

  • @hh9kw7gf3n
    @hh9kw7gf3n 2 роки тому +2

    superuseful thanks

    • @SoftwareNuggets
      @SoftwareNuggets  2 роки тому

      Glad to hear this video was useful, and thanks for taking the time to give me a shout out. Appreciated.

  • @Wawasabih
    @Wawasabih Рік тому

    This video is so underrated

    • @SoftwareNuggets
      @SoftwareNuggets  Рік тому

      It feels great to be appreciated, thanks for the comment.

  • @pvksmaheeth8816
    @pvksmaheeth8816 Рік тому

    why didnt you get a deadlock at 6:15, for me its coming

    • @SoftwareNuggets
      @SoftwareNuggets  Рік тому

      If you are in an open transaction, that will put a lock on the affected rows. Are you using two connections?

    • @pvksmaheeth8816
      @pvksmaheeth8816 Рік тому

      @@SoftwareNuggets two connections ? Two different tabs same query?

    • @SoftwareNuggets
      @SoftwareNuggets  Рік тому

      Let's look at the timeline (6:15) , you can see I have "two" SQL Server Management Studio's (SSMS) open at the same time. I can say, "having two open SSMS open, is much like having two separate users", do you agree? On your local computer, do you have TWO SSMS open, and are executing the same code at 6:15 in each appropriate window?

    • @pvksmaheeth8816
      @pvksmaheeth8816 Рік тому

      @@SoftwareNuggets yes I have two users, and I'm getting that error. Is there any function that can stop the table lock while update statement

    • @SoftwareNuggets
      @SoftwareNuggets  Рік тому

      hey @pvksmaheeth8816, so, one user has enter a begin trans, and performed an update, but, has not commit; a second user can use the "with (nolock) command, and get the data (could be old or stale), select column_name from table with (nolock) where column_name = 'value';
      In the example at 6:15, make this change: select * from product with
      (nolock) where id=3
      at 7:07, I use the (nolock) command. you can either use (nolock) or with (nolock)
      please let me know if that solved the question you asked.

  • @seangillespie4601
    @seangillespie4601 2 місяці тому

    how is a 10 minute video 8 minutes too long...

    • @SoftwareNuggets
      @SoftwareNuggets  2 місяці тому +1

      Hey @seangillespie4601, I agree! The video has been trimmed to remove unnecessary segments.