quick question,
Is there any way that you can always execute the entire script/query you have open in SSMS when you click the ‘Execute’ button, rather than executing simply the portion you have highlighted? This hasn’t been a problem for me yet, more just an annoyance, but I just realized (when I went to update a stored procedure) that I had only some comments selected. It looked like the query executed successfully, but that was because it was only executing the ignored comments. If I didn’t catch it, I could have lost data from the SP that I thought was saved to the database.
In this case, it wasn’t an issue, since I caught it right away and nothing broke by executing just the comments, but I’m a little bit worried that I might accidentally, say, run a portion of a query that would cause something to break if you only run that part, maybe something destructive like an UPDATE or DELETE, and not notice.
From what I can gather, I don’t think this is possible. I am on SSMS version 20.1.10.0.