All About SQL Server Stored Procedures: Comments

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025
  • Become a member! www.youtube.co...
    Ask me questions! go.erikdarling...
    Click here for 50% off a health check: training.erikd...
    If you like what you see here, you'll love my advanced performance tuning training:
    training.erikd...

ความคิดเห็น • 18

  • @endriuolszewski
    @endriuolszewski วันที่ผ่านมา +1

    Dziękujemy.

  • @ryanb9452
    @ryanb9452 2 วันที่ผ่านมา +1

    Thanks for this DarlingData. I support an enterprise application's databases where the code base is so aged, and changes happened without anyone else knowing about it I had to implement DDL change triggers to be able to troubleshoot problems like this.

    • @ErikDarlingData
      @ErikDarlingData  2 วันที่ผ่านมา

      I’ve learned to accept those levels of desperation to maintain some semblance of control.

  • @ghauan
    @ghauan 2 วันที่ผ่านมา

    Do you ever see that the ticketing system has been changed and the old tickets are not available any more?

    • @ErikDarlingData
      @ErikDarlingData  2 วันที่ผ่านมา

      I’m not sure I’ve come across that one.

    • @AaronGonzalez-n3x
      @AaronGonzalez-n3x วันที่ผ่านมา

      Been there. I have had to resort to digging into old emails, and it's not always been helpful.

  •  วันที่ผ่านมา

    Hadn't though of that, but will stop using -- comments immediately. I am guess they didn't make a way to attach block comments to the comment buttons though :)
    Except for debugging, the --select * line instead of running the actual select, and also --declare just above the query to set a test value so the thing will run.

    • @ErikDarlingData
      @ErikDarlingData  วันที่ผ่านมา

      There are certainly times when it’s convenient. Perhaps for testing blocks it’s an exception. But even then there are probably good reasons to encapsulate that with some details.

    •  วันที่ผ่านมา

      ​@@ErikDarlingData I guess /* select * --*/ would work also to make it a runnable block from inside the comment :)

  • @douglascoats7081
    @douglascoats7081 2 วันที่ผ่านมา +2

    /* How meta is my comment-comment? dur hur */

  •  วันที่ผ่านมา

    The state of database development is like coding in the 90s still. At least I don't know how to get version control when working in SSMS without a bunch of hassle, and not working in SSMS is a different bunch of hassle. Well there are, but they are seriously over priced, like 25x a Bitbucket license per user...
    Otherwise DDL change triggers is about it and you can't easily comment the commit. Azure Data Studio is being retired before it was mature enough to be useable ... vlc how it goes with VS Code for databases.

    • @ErikDarlingData
      @ErikDarlingData  วันที่ผ่านมา

      Yes, it's general anarchy. Very few organizations manage change control, permissions, etc. well.

    • @AaronGonzalez-n3x
      @AaronGonzalez-n3x วันที่ผ่านมา +1

      I think SSMS was never designed for coding. It's right there in the name: *management* studio.
      It's great for granting permissions, updating database properties or running queries to see what's going on with the server. Modern coding best practices? Nope, it's just not the right tool.

    • @ErikDarlingData
      @ErikDarlingData  วันที่ผ่านมา

      @@AaronGonzalez-n3x Well, no, not without an add-in like SQL Prompt. Intellisense is some sort of schizophrenic villlain. The GitHub integration in SSMS 21 is a nice touch, but seems like a weird learning curve vs. just using GitHub desktop.

    •  วันที่ผ่านมา

      @@AaronGonzalez-n3x This is true unfortunately there is no better coding tool especially for datawarehouse applications.
      When you not only need to run the queries you write (a few other tools better for coding can do that) but also make lots of structural changes in tables and indexes with the code, and edit data in configuration tables.
      SSMS21 and moving ADS to VS Code might make things better, at the same time low-code tools are lowering the demand on them as coding tools and increasing as debuggers to fix the crap the low-code solutions do.