Delimiter is not separating the Statements.

Darpan Ruparel 1 Reputation point

I am fairly new to the SQL Server Management Studio. I just installed it running the first code. For me, the delimiter; is not separating the statements. As you can see in the picture attached, all the statements are grouped, and when I run any one of them all three run at the same time. See the window below for the run code result.

I have tried POP SQL, this doen't happen in it. Each time when I hit Run, only the potion where my cursor is the code until delimiter runs.

My question is - is there any setting to make the SSMS recognize the delimiter and in the outlining, not to group the statements separated by a ";" delimiter. Here all three codes are part of one group as only one outline. Normally, only the code until the delimiter is part of one outlined group.


SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,322 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YufeiShao-msft 7,081 Reputation points

    Hi @Darpan Ruparel

    Query with SSMS will excute all the contents of the current window, unless highlight a query and then run
    You can choose to select directly with the mouse, or be quicker, you can just click on a line number, which will highlight the whole line


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.